Add guide documentation on printing exception information.
Suggested by badkins.
This commit is contained in:
parent
76a7ee0ccd
commit
81bdbb19e9
|
@ -117,6 +117,20 @@ predicate:
|
||||||
(error "user break"))
|
(error "user break"))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Exceptions carry information about the error that occurred. The
|
||||||
|
@racket[exn-message] accessor provides a descriptive message for the
|
||||||
|
exception. The @racket[exn-continuation-marks] accessor provides
|
||||||
|
information about the point where the exception was raised.
|
||||||
|
@margin-note{The @racket[continuation-mark-set->context] procedure provides best-effort structured backtrace information.}
|
||||||
|
|
||||||
|
@interaction[
|
||||||
|
(with-handlers ([exn:fail?
|
||||||
|
(lambda (v)
|
||||||
|
((error-display-handler) (exn-message v) v))])
|
||||||
|
(car 17))
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
|
|
||||||
@section[#:tag "prompt"]{Prompts and Aborts}
|
@section[#:tag "prompt"]{Prompts and Aborts}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user