Exception types and functions.
More...
|
| typedef jau::function< bool(const std::exception &, const char *file, int line)> | jau::exception_handler_t |
| | Exception handler method, should return true if not consumed or deemed an error. Shall be noexcept itself.
|
| |
|
| template<class UnaryPredicate> |
| bool | jau::do_noexcept (UnaryPredicate p) noexcept |
| | No throw wrap for given unary predicate p action. Returns true for success (no exception), otherwise false (exception occurred).
|
| |
| bool | jau::handle_exception (std::exception_ptr eptr, const char *file, int line) noexcept |
| | Handle given optional exception (nullable std::exception_ptr) and send std::exception::what() message to stderr
|
| |
| bool | jau::handle_exception (std::exception_ptr eptr, jau::exception_handler_t &eh, const char *file, int line) noexcept |
| | Handle given optional exception (nullable std::exception_ptr) and calls exception_handler_t.
|
| |
Exception types and functions.
◆ exception_handler_t
Exception handler method, should return true if not consumed or deemed an error. Shall be noexcept itself.
Definition at line 46 of file exceptions.hpp.
◆ handle_exception() [1/2]
| bool jau::handle_exception |
( |
std::exception_ptr | eptr, |
|
|
const char * | file, |
|
|
int | line ) |
|
inlinenoexcept |
Handle given optional exception (nullable std::exception_ptr) and send std::exception::what() message to stderr
- Parameters
-
| eptr | contains optional exception, may be nullptr |
- Returns
- true if
eptr contained an exception pointer, false otherwise (nullptr)
Definition at line 475 of file cpp_lang_util.hpp.
◆ do_noexcept()
template<class UnaryPredicate>
| bool jau::do_noexcept |
( |
UnaryPredicate | p | ) |
|
|
inlinenoexcept |
No throw wrap for given unary predicate p action. Returns true for success (no exception), otherwise false (exception occurred).
Definition at line 489 of file cpp_lang_util.hpp.
◆ handle_exception() [2/2]
Handle given optional exception (nullable std::exception_ptr) and calls exception_handler_t.
- Parameters
-
| eptr | contains optional exception, may be nullptr |
| eh | exception_handler_t to process an eventual exception |
- Returns
- true if
eptr contained an exception pointer, exception_handler_t result is returned. Otherwise false (no exception).
Definition at line 55 of file exceptions.hpp.