CLAM-Development  1.4.0
Public Member Functions | Static Public Attributes
CLAM::ErrAssertionFailed Class Reference

The exception thrown when an assertion fails. More...

#include <Assert.hxx>

List of all members.

Public Member Functions

 ErrAssertionFailed (const char *message, const char *filename, int linenumber)
virtual ~ErrAssertionFailed () throw ()
- Public Member Functions inherited from CLAM::Err
 Err () throw ()
 Err (const char *msg) throw ()
 Err (const Err &) throw ()
virtual ~Err () throw ()
void Print (void) const throw ()
virtual const char * what () const throw ()
void Embed (const std::exception &) throw ()
void Embed (const char *str) throw ()

Static Public Attributes

static bool breakpointInCLAMAssertEnabled = true
 this bool is used for automatic-tesing CLAM asserts.

Additional Inherited Members

- Protected Attributes inherited from CLAM::Err
char * mMsg

Detailed Description

The exception thrown when an assertion fails.

Don't throw it directly, use the assertion macro Assert instead because the Assert macro is sensible to the compilation conditions. Neither do any explicit declaration that this exception can be thrown from a function as you would have to do with any other exception. See the Error Notification Mechanisms documentation.

Todo:
Subclass ErrAssertionFailed from Err.
See also:
CLAM_ASSERT
CLAM_BEGIN_CHECK
CLAM_END_CHECK

Definition at line 215 of file Assert.hxx.


Constructor & Destructor Documentation

CLAM::ErrAssertionFailed::ErrAssertionFailed ( const char *  message,
const char *  filename,
int  linenumber 
)

Definition at line 120 of file Assert.cxx.

References breakpointInCLAMAssertEnabled, and CLAM::CurrentAssertFailedHandler.

virtual CLAM::ErrAssertionFailed::~ErrAssertionFailed ( ) throw ()
inlinevirtual

Definition at line 224 of file Assert.hxx.


Member Data Documentation

bool CLAM::ErrAssertionFailed::breakpointInCLAMAssertEnabled = true
static

this bool is used for automatic-tesing CLAM asserts.

by default is defined to true. But can be set to false where we want to test that a CLAM_ASSERT has occurred.

Definition at line 221 of file Assert.hxx.

Referenced by ErrAssertionFailed().


The documentation for this class was generated from the following files: