Adding things to unstable/error that are painful to remember and used everywhere
This commit is contained in:
parent
01b7f76b3c
commit
d909a9590d
|
@ -110,3 +110,9 @@ can be appended to the end of a base error message.
|
|||
}
|
||||
|
||||
@(close-eval the-eval)
|
||||
|
||||
@addition{Jay McCarthy}
|
||||
|
||||
@defproc[(exn:not-break? [x any/c]) boolean?]{Identifies values that are not @racket[exn:break?], i.e. values that are safe to catch with @racket[with-handlers].}
|
||||
|
||||
@defproc[(error-display [x any/c]) void?]{Calls @racket[(error-display-handler)] with the proper arguments whehter @racket[x] is an exception, or not.}
|
||||
|
|
|
@ -181,3 +181,20 @@ TODO
|
|||
[value (cadr lst)])
|
||||
(cons (cons field value)
|
||||
(field+detail-list->table who (cddr lst) onto)))]))
|
||||
|
||||
;; Added by Jay
|
||||
|
||||
(define (exn:not-break? x)
|
||||
(not (exn:break? x)))
|
||||
|
||||
(define (error-display x)
|
||||
((error-display-handler)
|
||||
(if (exn? x)
|
||||
(exn-message x)
|
||||
"non-exn error:")
|
||||
x))
|
||||
|
||||
(provide
|
||||
(contract-out
|
||||
[exn:not-break? (-> any/c boolean?)]
|
||||
[error-display (-> any/c void?)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user