mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Add custom exception handler to avoid call history
This commit is contained in:
parent
f5cf3b57ee
commit
8a65baef9c
1 changed files with 14 additions and 1 deletions
15
cyclone.scm
15
cyclone.scm
|
@ -947,5 +947,18 @@ Debug options:
|
|||
(display "cyclone: no input file")
|
||||
(newline))
|
||||
(else
|
||||
(run-compiler non-opts compile? cc-prog cc-exec cc-lib cc-so cc-linker-opts append-dirs prepend-dirs))))
|
||||
(with-handler
|
||||
(lambda (err)
|
||||
;(parameterize ((current-input-port (current-error-port))))
|
||||
(display "Error: " (current-error-port))
|
||||
(display (car err) (current-error-port))
|
||||
(newline (current-error-port))
|
||||
(for-each
|
||||
(lambda (obj)
|
||||
(write obj (current-error-port))
|
||||
(newline (current-error-port)))
|
||||
(cdr err))
|
||||
(newline (current-error-port))
|
||||
(exit 1) )
|
||||
(run-compiler non-opts compile? cc-prog cc-exec cc-lib cc-so cc-linker-opts append-dirs prepend-dirs)))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue