|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Exception constructor with formatted message. More...
#include <ah-errors.H>
Public Member Functions | |
| int | operator<<= (const std::ostream &s) |
| Operator that throws the exception with the constructed message. | |
Exception constructor with formatted message.
This helper class allows building exceptions with formatted messages using the stream insertion operator (<<). Used internally by the error handling macros.
| E | Exception type to throw (must derive from std::exception) * |
Definition at line 225 of file ah-errors.H.
|
inline |
Operator that throws the exception with the constructed message.
The macros put the message on its right. << binds tighter, so it takes the whole message; and with a class on its left there is no built-in <<=, so a message that does not give back a stream, as one whose last << gives back void, does not compile.
It is cold and out of line, as what makes the stream: a function that checks has of its message only the insertions of its items.
| s | Stream with the formatted error message |
| E | Exception of the specified type with the constructed message * |
Definition at line 243 of file ah-errors.H.