also print error

This commit is contained in:
Alex Shinn 2019-01-06 08:22:43 +08:00
parent c3189ebc9d
commit ec0b6e98f6
2 changed files with 3 additions and 1 deletions

View file

@ -114,6 +114,7 @@
(guard (exn
(else
(warn "couldn't load config:" file)
(print-exception exn)
(print-stack-trace exn)
(and (pair? opt) (car opt))))
(call-with-input-file file read)))

View file

@ -12,11 +12,12 @@
(cond-expand
(chibi
(import (only (meta) warn))
(import (only (chibi) print-stack-trace))
(import (only (chibi) print-exception print-stack-trace))
(import (only (chibi filesystem) file-directory?)))
(else
(begin
(define file-directory? file-exists?)
(define (print-exception exn) (write exn))
(define (print-stack-trace . o) #f)
(define (warn msg . args)
(let ((err (current-error-port)))