class CustomException

Base class for the custom exception hierarchy. More...

Definition#include <CustomException.h>
Inherited byEAssertionError, EBadLangFileError, EConfigError, EContractError, EInvariantError, EPostConditionError, EPreConditionError, ESQLError, EStringNotFoundError
List of all Methods
Annotated List

Public Methods

Protected Members

Detailed Description

CustomException is a base class for a hierarchy of custom exceptions. All exceptions inheriting from CustomException will handle a message() method to get information on the error.

All subclasses of CustomException should include the Q_OBJECT macro to allow exception handling routines to determine the exact type of the exception object.

Although it is possible, CustomException objects should not be instanciated directly. Using subclasses allow alot more precision in error handling.

CustomException ()

Default constructor. Creates a CustomException with the message "An error occured in the application".

CustomException (QString message)

Construct a CustomException object with an error message.

messageThe error message to display. The message should provide descriptive information, as it may end up displayed to the user.

QString message ()
[const virtual]

Get the error message of the CustomException object. Subclasses can override this method to provide more detailed functionnality.

Returns: The error message included on construction of the object.