mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Added an exception handler
This commit is contained in:
parent
94b3bd6bf2
commit
1449a75c98
1 changed files with 9 additions and 2 deletions
|
@ -46,7 +46,14 @@
|
|||
(define (loop)
|
||||
(let ((line (read-line)))
|
||||
(when (not (eof-object? line))
|
||||
(display (convert-line line))
|
||||
(newline)
|
||||
(call/cc
|
||||
(lambda (k)
|
||||
(with-exception-handler
|
||||
(lambda (obj)
|
||||
(display `(Error processing line ,line details ,obj))
|
||||
(k #t))
|
||||
(lambda ()
|
||||
(display (convert-line line))
|
||||
(newline)))))
|
||||
(loop))))
|
||||
(loop)
|
||||
|
|
Loading…
Add table
Reference in a new issue