Compare commits

...

1 Commits
master ... v6.3

Author SHA1 Message Date
Asumu Takikawa
087a053c49 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)
2015-11-19 17:36:25 -05:00
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)]{