Adjust docs on checks and current-check-handler

The description of how checks work was misleading since the
exception is usually not raised outside of the check call.

Also the default value for `current-check-handler` was described
incorrectly.

(cherry picked from commit a3a22d191f)
This commit is contained in:
Asumu Takikawa 2015-10-25 17:08:34 -04:00 committed by Ryan Culpepper
parent 0957188c09
commit 2bb9b79dc9
2 changed files with 6 additions and 5 deletions

View File

@ -10,10 +10,10 @@
@title{Checks} @title{Checks}
Checks are the basic building block of RackUnit. A check Checks are the basic building block of RackUnit. A check
checks some condition. If the condition holds the check checks some condition and always
evaluates to @racket[(void)]. If the condition doesn't hold the evaluates to @racket[(void)]. If the condition doesn't hold, the
check raises an instance of @racket[exn:test:check] with check will report the failure (see @racket[current-check-handler]
information detailing the failure. for customizing how failures are handled).
Although checks are implemented as macros, which is Although checks are implemented as macros, which is
necessary to grab source location, they are conceptually necessary to grab source location, they are conceptually

View File

@ -20,7 +20,8 @@ of these parameters.
@defparam[current-check-handler handler (-> any/c any)]{ @defparam[current-check-handler handler (-> any/c any)]{
Parameter containing the function that handles exceptions Parameter containing the function that handles exceptions
raised by check failures. The default value is @racket[raise]. raised by check failures. The default value is a procedure
that will display the exception data in a user-friendly format.
} }
@defparam[current-check-around check (-> (-> any) any)]{ @defparam[current-check-around check (-> (-> any) any)]{