|
BALL 1.5.0
|
#include <BALL/COMMON/exception.h>
Public Member Functions | |
Constructors and Destructors | |
| GeneralException () | |
| Default constructor. | |
| GeneralException (const char *file, int line) | |
| Constructor. | |
| GeneralException (const char *file, int line, const String &name, const String &message) | |
| Constructor. | |
| GeneralException (const GeneralException &exception) | |
| Copy constructor. | |
| virtual | ~GeneralException () throw () |
| Destructor. | |
Accessors | |
| const char * | file_ |
| int | line_ |
| std::string | name_ |
| std::string | message_ |
| const char * | getName () const |
| Returns the name of the exception. | |
| const char * | getMessage () const |
| Returns the error message of the exception. | |
| void | setMessage (const std::string &message) |
| Modify the exception's error message. | |
| int | getLine () const |
| Returns the line number where it occurred. | |
| const char * | getFile () const |
| Returns the file where it occurred. | |
General exception class. This class is intended as a base class for all other exceptions. Each exception class should define a constructor taking a string and an int as parameters. These two values are interpreted as the current filename and line number and is usually printed in case of an uncaught exception. To support this feature, each throw directive should look as follows:
Definition at line 59 of file COMMON/exception.h.
| BALL::Exception::GeneralException::GeneralException | ( | ) |
Default constructor.
| BALL::Exception::GeneralException::GeneralException | ( | const char * | file, |
| int | line ) |
Constructor.
| BALL::Exception::GeneralException::GeneralException | ( | const char * | file, |
| int | line, | ||
| const String & | name, | ||
| const String & | message ) |
Constructor.
| BALL::Exception::GeneralException::GeneralException | ( | const GeneralException & | exception | ) |
Copy constructor.
|
virtual | ||||||||||||
Destructor.
| const char * BALL::Exception::GeneralException::getFile | ( | ) | const |
Returns the file where it occurred.
| int BALL::Exception::GeneralException::getLine | ( | ) | const |
Returns the line number where it occurred.
| const char * BALL::Exception::GeneralException::getMessage | ( | ) | const |
Returns the error message of the exception.
| const char * BALL::Exception::GeneralException::getName | ( | ) | const |
Returns the name of the exception.
| void BALL::Exception::GeneralException::setMessage | ( | const std::string & | message | ) |
Modify the exception's error message.
|
protected |
Definition at line 107 of file COMMON/exception.h.
|
protected |
Definition at line 108 of file COMMON/exception.h.
|
protected |
Definition at line 111 of file COMMON/exception.h.
|
protected |
Definition at line 110 of file COMMON/exception.h.