![]() |
XTL
0.1
eXtended Template Library
|
Base exception for XTL. More...
Inheritance diagram for xtd::exception:
Collaboration diagram for xtd::exception:Public Types | |
| using | _super_t = std::exception |
| shortcut typedef of the super class | |
Static Public Member Functions | |
| template<typename _ReturnT , typename _ExpressionT > | |
| static _ReturnT | _throw_if (const xtd::source_location &source, _ReturnT ret, _ExpressionT exp, const char *expstr) |
| Helper function template to test for an expression and throw an exception Throws exception if the test expression returns true. More... | |
| int | _errnum |
| Constructors. | |
| const source_location & | _source |
| Constructors. | |
| std::string | _what |
| Constructors. | |
| exception (const source_location &Source, const std::string &What) | |
| Constructors. | |
| exception (const exception &src) | |
| Constructors. | |
| exception (exception &&src) | |
| Constructors. | |
| const char * | what () const noexceptoverride |
| }@ More... | |
| virtual const source_location & | location () const noexcept |
| location in source that caused the exception | |
Base exception for XTL.
Definition at line 27 of file exception.hpp.
|
inlinestatic |
Helper function template to test for an expression and throw an exception Throws exception if the test expression returns true.
_throw_if methods are present in many XTL exception classes. Typically, the throw_if macro will be used as in exception::throw_if to properly fill parameters
| _ReturnT | The return type of the function and type of the expression to evaluate. Implicitly deduced at compile time. |
| _ExpressionT | the type of expression tester that evaluates _ReturnT, normally a lambda. |
| source | The location in source code where called. |
| ret | The return value of _throw_if and parameter to exp used to test for success or failure |
| exp | Expression used to evaluate ret. Expression is in the form of: bool (_ReturnT). The exception is thrown if this expression evaluates to true. |
| expstr | String value passed to the exceptions constructor when thrown |
Definition at line 43 of file exception.hpp.
References exception().
Here is the call graph for this function:
|
inlineoverridenoexcept |