mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-21 06:39:16 +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)
|
(define (loop)
|
||||||
(let ((line (read-line)))
|
(let ((line (read-line)))
|
||||||
(when (not (eof-object? line))
|
(when (not (eof-object? line))
|
||||||
|
(call/cc
|
||||||
|
(lambda (k)
|
||||||
|
(with-exception-handler
|
||||||
|
(lambda (obj)
|
||||||
|
(display `(Error processing line ,line details ,obj))
|
||||||
|
(k #t))
|
||||||
|
(lambda ()
|
||||||
(display (convert-line line))
|
(display (convert-line line))
|
||||||
(newline)
|
(newline)))))
|
||||||
(loop))))
|
(loop))))
|
||||||
(loop)
|
(loop)
|
||||||
|
|
Loading…
Add table
Reference in a new issue