mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
also print error
This commit is contained in:
parent
c3189ebc9d
commit
ec0b6e98f6
2 changed files with 3 additions and 1 deletions
|
@ -114,6 +114,7 @@
|
||||||
(guard (exn
|
(guard (exn
|
||||||
(else
|
(else
|
||||||
(warn "couldn't load config:" file)
|
(warn "couldn't load config:" file)
|
||||||
|
(print-exception exn)
|
||||||
(print-stack-trace exn)
|
(print-stack-trace exn)
|
||||||
(and (pair? opt) (car opt))))
|
(and (pair? opt) (car opt))))
|
||||||
(call-with-input-file file read)))
|
(call-with-input-file file read)))
|
||||||
|
|
|
@ -12,11 +12,12 @@
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(chibi
|
(chibi
|
||||||
(import (only (meta) warn))
|
(import (only (meta) warn))
|
||||||
(import (only (chibi) print-stack-trace))
|
(import (only (chibi) print-exception print-stack-trace))
|
||||||
(import (only (chibi filesystem) file-directory?)))
|
(import (only (chibi filesystem) file-directory?)))
|
||||||
(else
|
(else
|
||||||
(begin
|
(begin
|
||||||
(define file-directory? file-exists?)
|
(define file-directory? file-exists?)
|
||||||
|
(define (print-exception exn) (write exn))
|
||||||
(define (print-stack-trace . o) #f)
|
(define (print-stack-trace . o) #f)
|
||||||
(define (warn msg . args)
|
(define (warn msg . args)
|
||||||
(let ((err (current-error-port)))
|
(let ((err (current-error-port)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue