pr7869 errortrace
svn: r2130
This commit is contained in:
parent
d333ba0f51
commit
9fe4f5ed93
|
@ -68,15 +68,11 @@
|
||||||
(build-path base path)))
|
(build-path base path)))
|
||||||
|
|
||||||
;; exn->string : (union exn any) -> string
|
;; exn->string : (union exn any) -> string
|
||||||
;; builds an error message, including errortrace annotations (if present)
|
|
||||||
;; TODO: do we really need this? Ask Robby about better ways to print exceptions.
|
|
||||||
(define (exn->string exn)
|
(define (exn->string exn)
|
||||||
(if (exn? exn)
|
(if (exn? exn)
|
||||||
(let ([op (open-output-string)])
|
(parameterize ([current-error-port (open-output-string)])
|
||||||
(display (exn-message exn) op)
|
((error-display-handler) (exn-message exn) exn)
|
||||||
(newline op)
|
(get-output-string (current-error-port)))
|
||||||
(print-error-trace op exn)
|
|
||||||
(get-output-string op))
|
|
||||||
(format "~s\n" exn)))
|
(format "~s\n" exn)))
|
||||||
|
|
||||||
; lowercase-symbol! : (union string bytes) -> symbol
|
; lowercase-symbol! : (union string bytes) -> symbol
|
||||||
|
|
Loading…
Reference in New Issue
Block a user