#include <plError.h>
Inheritance diagram for plError:
Public Member Functions | |
plError () | |
Default void constructor. | |
plError (const int &error_id) | |
Creates an error number {error_id} with no additional information. | |
plError (const int &error_id, const std::string &additional_info) | |
Creates an error number {error_id}, with additional information. | |
virtual | ~plError () |
Erases the object. | |
void | display (std::ostream &out=std::cerr) const |
Displays the message error according to the error number in the output stream 'out'. | |
unsigned int | get_error_number () |
Returns the error id number. | |
std::ostream & | operator<< (std::ostream &out) const |
Displays the message error according to the error number in the output stream 'out'. | |
virtual void | action () |
Executes an action in error. | |
Static Public Member Functions | |
static void | AbortInError (const bool &abort_flag) |
Sets the aborting state to {true} or {false}. | |
static void | AlwaysDisplay (const bool &display_flag) |
Sets the display error state to {true} or {false}. | |
static void | ignore_this_message (unsigned int id_message, bool ignoring_state) |
Permits to turn off the message with the given id. | |
static void | SetLanguage (const plLanguage &chosen_language) |
Sets the default language to be used in error messages. | |
Public Attributes | |
std::string | other_info |
For some errors this field contains additional information about the error (e.g. | |
Protected Attributes | |
bool | fatal |
{true} if the error is fatal | |
unsigned int | error_number |
Identifies the error number. | |
Static Protected Attributes | |
static bool | abort_in_error |
Permets to know if the program must be stoped when an error is detected. | |
static bool | always_display_error |
Permets to know if the program must display an error when it is produced. | |
static plLanguage | language |
Indicates the default language to be used in error messages. |
Definition at line 42 of file plError.h.
|
Sets the aborting state to {true} or {false}. If the aborting state is set to {true} your program will stop as soon as the first error is detected. Otherwise the error must be handled by using the C++ exception mechanism {try } and {catch} |
|
Sets the display error state to {true} or {false}. If the error display state is set to {true} your program will display the error as soon as the first error is detected. Otherwise the error must be handled by using the C++ exception mechanism {try } and {catch} Reimplemented in plWarning. |
|
Permits to turn off the message with the given id. This is very practical when we are doing something "wrong" consciously and do not want to see the warning message into the screen. For example, when we make a draw with out compiling an inferred kernel we do not want to have the message telling that it is better to compile it before |
|
For some errors this field contains additional information about the error (e.g. the name of a variable) |