wxm::lib::Except is the class to use for creating and throwing exceptions.
More...
#include <wxexcept.h>
wxm::lib::Except is the class to use for creating and throwing exceptions.
It supports the standard I/O library operators to create the exception messages. For example, one can do
wxm::lib::Warpx:Except ex("An exception "); ex << "occured at line " << 25 << std::endl;
|
| Except () |
| Creates a new exception object with empty message and backtrace.
|
|
| Except (const std::string &str) |
| Creates new exception with supplied message.
|
|
| Except (Except &&ex)=default |
|
| Except (const Except &ex) |
| Copies exception and backtrace from supplied exception object.
|
|
| ~Except () override=default |
| Deletes exception.
|
|
Except & | operator= (const Except &ex) |
| Assigns from supplied exception object.
|
|
const char * | what () const noexcept override |
| Returns error message: this is provided for compatibility with std::exception interface.
|
|
template<typename T > |
Except & | operator<< (const T &ex) |
| Inserts an element into the output message.
|
|
Except & | operator<< (std::ostream &(*p)(std::ostream &)) |
| Inserts iomanip element into the output message.
|
|
const std::vector< std::string > & | get_stack_trace () const |
| This returns the stack trace.
|
|
◆ Except() [1/4]
wxm::lib::Except::Except |
( |
| ) |
|
Creates a new exception object with empty message and backtrace.
◆ Except() [2/4]
wxm::lib::Except::Except |
( |
const std::string & |
str | ) |
|
Creates new exception with supplied message.
- Parameters
-
◆ Except() [3/4]
wxm::lib::Except::Except |
( |
Except && |
ex | ) |
|
|
default |
◆ Except() [4/4]
wxm::lib::Except::Except |
( |
const Except & |
ex | ) |
|
Copies exception and backtrace from supplied exception object.
- Parameters
-
◆ ~Except()
wxm::lib::Except::~Except |
( |
| ) |
|
|
overridedefault |
◆ get_stack_trace()
const std::vector< std::string > & wxm::lib::Except::get_stack_trace |
( |
| ) |
const |
This returns the stack trace.
Added feature not included in std:exception.
- Returns
- Stack trace.
◆ operator<<() [1/2]
template<typename T >
Except & wxm::lib::Except::operator<< |
( |
const T & |
ex | ) |
|
|
inline |
Inserts an element into the output message.
- Parameters
-
- Returns
- reference to this class.
◆ operator<<() [2/2]
Except & wxm::lib::Except::operator<< |
( |
std::ostream &(*)(std::ostream &) |
p | ) |
|
|
inline |
Inserts iomanip element into the output message.
- Parameters
-
p | Iomanip element to insert. |
- Returns
- reference to this class.
◆ operator=()
Assigns from supplied exception object.
- Parameters
-
◆ what()
const char * wxm::lib::Except::what |
( |
| ) |
const |
|
overridenoexcept |
Returns error message: this is provided for compatibility with std::exception interface.
- Returns
- Message from exception.
The documentation for this class was generated from the following file: