|
limal
|
Common LiMaL exceptions. More...
Go to the source code of this file.
Namespaces | |
| namespace | limal |
Functions | |
| limal::BLOCXX_DECLARE_EXCEPTION (Memory) | |
| MemoryException class declaration. | |
| limal::BLOCXX_DECLARE_EXCEPTION (Runtime) | |
| RuntimeException class declaration. | |
| limal::BLOCXX_DECLARE_EXCEPTION (Overflow) | |
| OverflowException class declaration. | |
| limal::BLOCXX_DECLARE_EXCEPTION (Syntax) | |
| SyntaxException class declaration. | |
| limal::BLOCXX_DECLARE_EXCEPTION (Value) | |
| ValueException class declaration. | |
| limal::BLOCXX_DECLARE_EXCEPTION (System) | |
| SystemException class declaration. | |
Common LiMaL exceptions.
This header file declares several common exception types.
BloCxx provides several macros helping to throw exceptions:
#include <limal/Exception.hpp> #include <blocxx/Format.hpp> BLOCXX_THROW_ERRNO_MSG(limal::SystemException, "Can't do this and that"); const int MY_INVALID_EMAIL_ERROR_NUMBER = 42; BLOCXX_THROW_ERR(limal::ValueException, "Argument is not a valid email", MY_INVALID_EMAIL_ERROR_NUMBER); BLOCXX_THROW(limal::SyntaxException, Format("Syntax error in line %1", 42).c_str()); try { do_something(); } catch(const blocxx::Exception &subex) { BLOCXX_THROW_SUBEX(limal::RuntimeException, "Bad things happened", subex); }
See BloCxx documentation for more informations.
1.7.5.1