Base class for all exceptions (derived from std::exception).
More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/util/Exception.h>
|
| Exception (const std::string &description, unsigned int lineNumber, const char *filename, const char *functionName) |
| Creates the exception but doesn't yet compose the full descrption (because of the virtual functions) More...
|
|
| Exception (const std::string &description) |
| Simplified constructor with just a description. If you need more, use the other one. More...
|
|
virtual | ~Exception () throw () |
| Needed for compatibility with std::exception. More...
|
|
virtual const std::string & | getDescription () const |
| Returns the short developer written exception. More...
|
|
virtual const std::string & | getFilename () const |
| Returns the filename in which the exception occurred. More...
|
|
virtual const std::string & | getFullDescription () const |
| Returns a full description with type, line, file and function. More...
|
|
virtual const std::string & | getFunctionName () const |
| Returns the function in which the exception occurred. More...
|
|
virtual unsigned int | getLineNumber () const |
| Returns the line number on which the exception occurred. More...
|
|
virtual std::string | getTypeName () const =0 |
| Returns the string name of the exception type. More...
|
|
const char * | what () const throw () |
| Returns the error description. More...
|
|
|
static std::string | handleMessage () |
| Retrieves information from an exception caught with "..." Works for std::exception and CEGUI::Exception. More...
|
|
Base class for all exceptions (derived from std::exception).
This class provides support for information about the file, the line and the function the error occurred.
- See also
- Exception.h
orxonox::Exception::Exception |
( |
const std::string & |
description, |
|
|
unsigned int |
lineNumber, |
|
|
const char * |
filename, |
|
|
const char * |
functionName |
|
) |
| |
Creates the exception but doesn't yet compose the full descrption (because of the virtual functions)
- Parameters
-
description | Exception description as string. This message is supposed to help developers! |
lineNumber | The number of the code-line in which the exception occurred |
filename | The file in which the exception occurred |
functionName | The function in which the exception occurred |
orxonox::Exception::Exception |
( |
const std::string & |
description | ) |
|
Simplified constructor with just a description. If you need more, use the other one.
virtual orxonox::Exception::~Exception |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inlinevirtual |
Needed for compatibility with std::exception.
virtual const std::string& orxonox::Exception::getDescription |
( |
| ) |
const |
|
inlinevirtual |
Returns the short developer written exception.
virtual const std::string& orxonox::Exception::getFilename |
( |
| ) |
const |
|
inlinevirtual |
Returns the filename in which the exception occurred.
const std::string & orxonox::Exception::getFullDescription |
( |
| ) |
const |
|
virtual |
Returns a full description with type, line, file and function.
virtual const std::string& orxonox::Exception::getFunctionName |
( |
| ) |
const |
|
inlinevirtual |
Returns the function in which the exception occurred.
virtual unsigned int orxonox::Exception::getLineNumber |
( |
| ) |
const |
|
inlinevirtual |
Returns the line number on which the exception occurred.
virtual std::string orxonox::Exception::getTypeName |
( |
| ) |
const |
|
pure virtual |
Returns the string name of the exception type.
std::string orxonox::Exception::handleMessage |
( |
| ) |
|
|
static |
Retrieves information from an exception caught with "..." Works for std::exception and CEGUI::Exception.
const char * orxonox::Exception::what |
( |
| ) |
const |
throw | ( | |
| ) | | |
Returns the error description.
std::string orxonox::Exception::description_ |
|
protected |
User typed text about why the exception occurred.
std::string orxonox::Exception::filename_ |
|
protected |
File where the exception occurred.
std::string orxonox::Exception::fullDescription_ |
|
mutableprotected |
Full description with line, file and function.
std::string orxonox::Exception::functionName_ |
|
protected |
Function (including namespace and class) where the exception occurred.
unsigned int orxonox::Exception::lineNumber_ |
|
protected |
Line on which the exception occurred.
The documentation for this class was generated from the following files: