>>>>> "mm" == Michal Maruška <mmc@maruska.dyndns.org> writes:
mm> now it works! Thanks. The ftp:get terminates succesfully.
mm> But still ftp:ls and ftp:dir raise:
mm>
mm> Error: exception
mm> wrong-type-argument
mm> (string-length '())
hmm, it seems that let-optionals* has changed. The attached patch
(which includes the previous one) fixes this.
BTW, here is an example of how you can write code to handle errors
that are signaled as ftp:error.
(define (with-ftp-error-handler* thunk)
(call-with-current-continuation
(lambda (k)
(with-handler
(lambda (condition next)
(cond ((eq? 'ftp:error (car condition))
(format #t "FTP error signaled: ~a~%" (cadr condition)))
(else (next))))
thunk))))
(define-syntax with-ftp-error-handler
(syntax-rules ()
((with-ftp-error-handler ?body ...)
(with-ftp-error-handler* (lambda () ?body ...)))))
sunet-ftp.diff
Description: Text Data
--
Eric Marsden <URL:http://www.laas.fr/~emarsden/>
|