#include <exception.hpp>
Guichan will only throw exceptions of this class. You can use this class for your own exceptions. A nifty feature of the excpetion class is that it can tell you from which line and file it was thrown. To make things easier when throwing exceptions there exists a macro for creating exceptions which automatically sets the filename and line number.
EXAMPLE:
throw GCN_EXCEPTION("my error message");
Definition at line 94 of file exception.hpp.
Public Member Functions | |
| Exception () | |
| Constructor. | |
| Exception (const std::string &message) | |
| Constructor. | |
| Exception (const std::string &message, const std::string &function, const std::string &filename, int line) | |
| Constructor. | |
| const std::string & | getFunction () const |
| Gets the function name in which the exception was thrown. | |
| const std::string & | getMessage () const |
| Gets the error message of the exception. | |
| const std::string & | getFilename () const |
| Gets the filename in which the exceptions was thrown. | |
| int | getLine () const |
| Gets the line number of the line where the exception was thrown. | |
Protected Attributes | |
| std::string | mFunction |
| std::string | mMessage |
| std::string | mFilename |
| int | mLine |
|
|
Constructor.
Definition at line 68 of file exception.cpp. |
|
||||||||||||||||||||
|
Constructor. NOTE: Don't use this constructor. Use the GCN_EXCEPTION macro instead.
Definition at line 73 of file exception.cpp. |
|
|
Gets the filename in which the exceptions was thrown.
Definition at line 94 of file exception.cpp. |
|
|
Gets the function name in which the exception was thrown.
Definition at line 84 of file exception.cpp. |
|
|
Gets the line number of the line where the exception was thrown.
Definition at line 99 of file exception.cpp. |
|
|
Gets the error message of the exception.
Definition at line 89 of file exception.cpp. |
1.4.1