|
|
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.
Parameters:
message | The error message to display. The message should provide descriptive information, as it may end up displayed to the user. |
QString message () |
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.