|
libcamgm
|
Common LiMaL exceptions. More...
Go to the source code of this file.
Classes | |
| class | ca_mgm::Exception |
| struct | ca_mgm::ExceptionDetail::Errno< exType > |
| class | ca_mgm::MemoryException |
| MemoryException class declaration. More... | |
| class | ca_mgm::RuntimeException |
| RuntimeException class declaration. More... | |
| class | ca_mgm::OverflowException |
| OverflowException class declaration. More... | |
| class | ca_mgm::SyntaxException |
| SyntaxException class declaration. More... | |
| class | ca_mgm::ValueException |
| ValueException class declaration. More... | |
| class | ca_mgm::SystemException |
| SystemException class declaration. More... | |
| class | ca_mgm::OutOfBoundsException |
Namespaces | |
| ca_mgm | |
| ca_mgm::ExceptionDetail | |
Macros | |
| #define | CA_MGM_DECLARE_EXCEPTION2(NAME, BASE) |
| #define | CA_MGM_DECLARE_EXCEPTION(NAME) CA_MGM_DECLARE_EXCEPTION2(NAME, ca_mgm::Exception) |
| #define | CA_MGM_DEFINE_EXCEPTION2(NAME, BASE) |
| #define | CA_MGM_DEFINE_EXCEPTION(NAME) CA_MGM_DEFINE_EXCEPTION2(NAME, ca_mgm::Exception) |
| #define | CA_MGM_THROW(exType, msg) throw exType(__FILE__, __LINE__, (msg)) |
| #define | CA_MGM_THROW_SUBEX(exType, msg, subex) throw exType(__FILE__, __LINE__, (msg), -1, &(subex)) |
| #define | CA_MGM_THROW_ERR(exType, msg, err) throw exType(__FILE__, __LINE__, (msg), (err)) |
| #define | CA_MGM_THROW_ERRNO(exType) CA_MGM_THROW_ERRNO1(exType, errno) |
| #define | CA_MGM_THROW_ERRNO1(exType, errnum) throw ::ca_mgm::ExceptionDetail::Errno< exType >::simple(__FILE__, __LINE__, (errnum)) |
| #define | CA_MGM_THROW_ERRNO_MSG(exType, msg) CA_MGM_THROW_ERRNO_MSG1(exType, (msg), errno) |
| #define | CA_MGM_THROW_ERRNO_MSG1(exType, msg, errnum) |
Variables | |
| unsigned const | ca_mgm::ExceptionDetail::BUFSZ = 1024 |
Common LiMaL exceptions.
This header file declares several common exception types.
BloCxx provides several macros helping to throw exceptions:
See BloCxx documentation for more informations.
| #define CA_MGM_DECLARE_EXCEPTION | ( | NAME | ) | CA_MGM_DECLARE_EXCEPTION2(NAME, ca_mgm::Exception) |
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typically used in a header file.
| NAME | The name of the new class (Exception will be postfixed) |
| #define CA_MGM_DECLARE_EXCEPTION2 | ( | NAME, | |
| BASE | |||
| ) |
Declare a new exception class named <NAME>Exception that derives from <BASE>. This macro is typically used in a header file.
| NAME | The name of the new class (Exception will be postfixed) |
| BASE | The base class. |
| #define CA_MGM_DEFINE_EXCEPTION | ( | NAME | ) | CA_MGM_DEFINE_EXCEPTION2(NAME, ca_mgm::Exception) |
Define a new exception class named <NAME>Exception that derives from Exception. The new class will use UNKNOWN_SUBCLASS_ID for the subclass id. Use this macro for internal implementation exceptions that don't have an id. This macro is typically used in a cpp file.
| NAME | The name of the new class (Exception will be postfixed) |
| #define CA_MGM_DEFINE_EXCEPTION2 | ( | NAME, | |
| BASE | |||
| ) |
Define a new exception class named <NAME>Exception that derives from <BASE>. The new class will use UNKNOWN_SUBCLASS_ID for the subclass id. This macro is typically used in a cpp file.
| NAME | The name of the new class (Exception will be postfixed) |
| BASE | The base class. |
| #define CA_MGM_THROW | ( | exType, | |
| msg | |||
| ) | throw exType(__FILE__, __LINE__, (msg)) |
Throw an exception using FILE and LINE. If applicable, CA_MGM_THROW_ERR should be used instead of this macro.
| exType | The type of the exception |
| msg | The exception message. A string that will be copied. |
| #define CA_MGM_THROW_ERR | ( | exType, | |
| msg, | |||
| err | |||
| ) | throw exType(__FILE__, __LINE__, (msg), (err)) |
Throw an exception using FILE and LINE.
| exType | The type of the exception |
| msg | The exception message. A string that will be copied. |
| err | The error code. |
| #define CA_MGM_THROW_ERRNO | ( | exType | ) | CA_MGM_THROW_ERRNO1(exType, errno) |
Throw an exception using FILE, LINE, errno and strerror(errno)
| exType | The type of the exception; ctor must take file, line, message, and error code. |
| #define CA_MGM_THROW_ERRNO1 | ( | exType, | |
| errnum | |||
| ) | throw ::ca_mgm::ExceptionDetail::Errno< exType >::simple(__FILE__, __LINE__, (errnum)) |
Throw an exception using FILE, LINE, errnum and strerror(errnum)
| exType | The type of the exception; ctor must take file, line, message, and error code. |
| errnum | The errno value. |
| #define CA_MGM_THROW_ERRNO_MSG | ( | exType, | |
| msg | |||
| ) | CA_MGM_THROW_ERRNO_MSG1(exType, (msg), errno) |
Throw an exception using FILE, LINE, errno and strerror(errno)
| exType | The type of the exception; ctor must take file, line, message, and error code. |
| msg | The exception message to use. |
| #define CA_MGM_THROW_ERRNO_MSG1 | ( | exType, | |
| msg, | |||
| errnum | |||
| ) |
Throw an exception using FILE, LINE, errnum and strerror(errnum)
| exType | The type of the exception; ctor must take file, line, message, and error code. |
| msg | The exception message to use. |
| errnum | The errno value. |
| #define CA_MGM_THROW_SUBEX | ( | exType, | |
| msg, | |||
| subex | |||
| ) | throw exType(__FILE__, __LINE__, (msg), -1, &(subex)) |
Throw an exception using FILE and LINE.
| exType | The type of the exception |
| msg | The exception message. A string that will be copied. |
| subex | A sub-exception. A pointer to it will be passed to the exception constructor, which should clone() it. |
1.8.8