# HG changeset patch # User alpar # Date 1155218041 0 # Node ID 0975cad06c2be0d16905036111ddbd75169eefa2 # Parent f9e43b5cc6174fec84ccb2e91878c18e11552119 Doc improvements diff -r f9e43b5cc617 -r 0975cad06c2b lemon/error.h --- a/lemon/error.h Thu Aug 10 13:52:56 2006 +0000 +++ b/lemon/error.h Thu Aug 10 13:54:01 2006 +0000 @@ -582,15 +582,20 @@ /// Macro for assertions with customizable message. /// /// The assertions are disabled in the default behaviour. You can -/// enable the assertions with the LEMON_ENABLE_ASSERTS macro what +/// enable the assertions with the +/// \code +/// #define LEMON_ENABLE_ASSERTS +/// \endcode +/// Then an assert /// provides a log on the standard error about the assertion and aborts -/// the program. If the LEMON_ASSERT_DO_ABORT macro is setted to false -/// then the just the log message can be seen on the standard error but -/// the program is not stopped. With the LEMON_ASSERT_FAILURE and -/// LEMON_ASSERT_EXCEPTION macros you can set other behaviour to the -/// assertions. The LEMON_ASSERT_FAILURE will always throw an \c -/// AssertionFailedError exception with the \c msg error message. The -/// \c LEMON_ASSERT_EXCEPTION can throw a user defined exception. +/// the program if LEMON_ASSERT_DO_ABORT is also defined (otherwise the +/// program keeps on running). +/// By defining LEMON_ASSERT_FAILURE or +/// LEMON_ASSERT_EXCEPTION, you can set other behaviour to the +/// assertions. In case LEMON_ASSERT_FAILURE is given, LEMON_ASSERT +/// will always throw an \c AssertionFailedError exception with +/// the \c msg error message. By using +/// LEMON_ASSERT_EXCEPTION, one can define an arbitrary exception to be thrown. /// /// The LEMON_ASSERT macro should be called with the \c exp parameter /// which should be an expression convertible to bool. If the given @@ -600,7 +605,6 @@ /// \ref "Exception::what" what() function is called to retrieve and /// display the error message. /// -/// /// \todo We should provide some way to reset to the default behaviour, /// shouldn't we? ///