|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Custom exception classes with source location tracking. More...
Go to the source code of this file.
Classes | |
| struct | AlephException |
| Aleph exception class. More... | |
| struct | MinMaxReversed |
| struct | InvalidCsvHeader |
| struct | InvalidCsvRow |
| struct | InvalidValue |
| struct | OutOfMemory |
| struct | OutOfRange |
| struct | ValueNotFound |
| struct | CommandLineError |
| struct | InvariantError |
| struct | SizeMismatch |
| struct | InvalidConversion |
| struct | NameNotFound |
| struct | InvalidSize |
| struct | InvalidRange |
| struct | InvalidUnit |
| struct | DuplicatedOperation |
| struct | DuplicatedName |
| struct | InvalidRead |
| struct | FileNotFound |
Macros | |
| #define | ALEPH_EXCEPTIONS_DEPRECATED [[deprecated("aleph-exceptions.H goes in 8.0.0; use the macros of ah-errors.H instead")]] |
| #define | DEFINE_ALEPH_EXCEPTION(name, category_msg) |
| Define a new exception. | |
| #define | ALEPHTHROW(type, msg) throw type(__LINE__, __FILE__, #type, msg) |
| Macro for throwing an aleph exception. | |
| #define | ALEPH_DEFINE_DEPRECATED_EXCEPTION(name, category_msg) |
Custom exception classes with source location tracking.
This file provides AlephException, a custom exception class that captures file name, line number, and function name where the exception was thrown.
line_number: Line where exception was thrownfile_name: Source file namefunction_name: Function where thrownUse the DEFINE_ALEPH_EXCEPTION macro:
For new code, prefer using ah-errors.H macros which provide automatic source location capture:
LFit uses it, which throws SizeMismatch until 8.0.0: aleph-exceptions.H goes in 8.0.0, and LFit throws then std::invalid_argument, as the macros of ah-errors.H do. Its classes are [[deprecated]], and DEFINE_ALEPH_EXCEPTION, which derives from AlephException, warns where it is used. To catch the errors of LFit both before and after 8.0.0, catch std::exception.Definition in file aleph-exceptions.H.
| #define ALEPH_DEFINE_DEPRECATED_EXCEPTION | ( | name, | |
| category_msg | |||
| ) |
Definition at line 212 of file aleph-exceptions.H.
| #define ALEPH_EXCEPTIONS_DEPRECATED [[deprecated("aleph-exceptions.H goes in 8.0.0; use the macros of ah-errors.H instead")]] |
Definition at line 107 of file aleph-exceptions.H.
| #define ALEPHTHROW | ( | type, | |
| msg | |||
| ) | throw type(__LINE__, __FILE__, #type, msg) |
Macro for throwing an aleph exception.
| [in] | type | aleph exception class name |
| [in] | msg | message describing the error |
aleph-exceptions.H goes in 8.0.0: use the macros of ah-errors.H. The classes that it throws are deprecated. Definition at line 201 of file aleph-exceptions.H.
| #define DEFINE_ALEPH_EXCEPTION | ( | name, | |
| category_msg | |||
| ) |
Define a new exception.
| [in] | name | of the exception |
| [in] | category_msg |
aleph-exceptions.H goes in 8.0.0: the class that it defines derives from the deprecated AlephException, and the macro warns where it is used. Definition at line 178 of file aleph-exceptions.H.