From a3a22d191f6ef245cf7c350e0c9507bf91a9a9a0 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Sun, 25 Oct 2015 17:08:34 -0400 Subject: [PATCH] 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. --- rackunit-doc/rackunit/scribblings/check.scrbl | 8 ++++---- rackunit-doc/rackunit/scribblings/internals.scrbl | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rackunit-doc/rackunit/scribblings/check.scrbl b/rackunit-doc/rackunit/scribblings/check.scrbl index 59dfbfe..7782467 100644 --- a/rackunit-doc/rackunit/scribblings/check.scrbl +++ b/rackunit-doc/rackunit/scribblings/check.scrbl @@ -10,10 +10,10 @@ @title{Checks} Checks are the basic building block of RackUnit. A check -checks some condition. If the condition holds the check -evaluates to @racket[(void)]. If the condition doesn't hold the -check raises an instance of @racket[exn:test:check] with -information detailing the failure. +checks some condition and always +evaluates to @racket[(void)]. If the condition doesn't hold, the +check will report the failure (see @racket[current-check-handler] +for customizing how failures are handled). Although checks are implemented as macros, which is necessary to grab source location, they are conceptually diff --git a/rackunit-doc/rackunit/scribblings/internals.scrbl b/rackunit-doc/rackunit/scribblings/internals.scrbl index 2d901a9..eef8d2f 100644 --- a/rackunit-doc/rackunit/scribblings/internals.scrbl +++ b/rackunit-doc/rackunit/scribblings/internals.scrbl @@ -20,7 +20,8 @@ of these parameters. @defparam[current-check-handler handler (-> any/c any)]{ 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)]{