Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

plError Class Reference

A {plError} permets to catch internal exceptions (errors) generated by inadequate use of OpenPL classes and methods. More...

#include <plError.h>

Inheritance diagram for plError:

Inheritance graph
[legend]
Collaboration diagram for plError:

Collaboration graph
[legend]
List of all members.

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.

Detailed Description

A {plError} permets to catch internal exceptions (errors) generated by inadequate use of OpenPL classes and methods.

Definition at line 42 of file plError.h.


Member Function Documentation

static void plError::AbortInError const bool &  abort_flag  )  [static]
 

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}

static void plError::AlwaysDisplay const bool &  display_flag  )  [static]
 

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.

static void plError::ignore_this_message unsigned int  id_message,
bool  ignoring_state
[static]
 

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


Member Data Documentation

std::string plError::other_info
 

For some errors this field contains additional information about the error (e.g.

the name of a variable)

Definition at line 73 of file plError.h.


The documentation for this class was generated from the following file:
Generated on Fri Apr 1 10:58:49 2005 for ProBT by  doxygen 1.4.1