This class is designed to declare objects to be thrown as exceptions by TerraLib.
More...
#include <Exception.h>
|
int | m_code |
| The internal exception code.
|
|
std::string | m_msg |
| The internal exception message.
|
|
This class is designed to declare objects to be thrown as exceptions by TerraLib.
What is an Exception?
-
It can be an error during a processing function: like out-of-memory, wrong path, wrong calculus;
-
It can be triggered by a missed value or pointer;
-
It can be triggered by a parameter out of range.
In other words, it can be any exception thrown by TerraLib when something goes wrong.
- Note
- TerraLib Exception class is a subclass of std::exception.
-
In future we must revisit this class and remove the embbed std::string.
Definition at line 58 of file Exception.h.
◆ Exception() [1/3]
te::common::Exception::Exception |
( |
| ) |
|
throw | ( | |
| ) | | |
◆ Exception() [2/3]
te::common::Exception::Exception |
( |
const std::string & |
what, |
|
|
int |
code = UNKNOWN_EXCEPTION |
|
) |
| |
throw | ( | |
| ) | | |
|
explicit |
It initializes a new Exception.
- Parameters
-
what | A brief description of what has raised the exception. |
◆ Exception() [3/3]
te::common::Exception::Exception |
( |
const char *const |
what, |
|
|
int |
code = UNKNOWN_EXCEPTION |
|
) |
| |
throw | ( | |
| ) | | |
|
explicit |
It initializes a new Exception.
- Parameters
-
what | A brief description of what has raised the exception. |
◆ ~Exception()
virtual te::common::Exception::~Exception |
( |
| ) |
|
throw | ( | |
| ) | | |
|
virtual |
◆ code()
virtual int te::common::Exception::code |
( |
| ) |
const |
throw | ( | |
| ) | | |
|
virtual |
It gets the exception code.
- Returns
- The exception code.
◆ getClassName()
virtual const char * te::common::Exception::getClassName |
( |
| ) |
const |
throw | ( | |
| ) | | |
|
virtual |
◆ what()
virtual const char * te::common::Exception::what |
( |
| ) |
const |
throw | ( | |
| ) | | |
|
virtual |
It outputs the exception message.
- Returns
- The exception message.
◆ m_code
int te::common::Exception::m_code |
|
protected |
The internal exception code.
Definition at line 105 of file Exception.h.
◆ m_msg
std::string te::common::Exception::m_msg |
|
protected |
The internal exception message.
Definition at line 106 of file Exception.h.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/common/Exception.h