#include <icy/error.h>Basic error type.
Errors contain an error code, message, and exception pointer.
int errstd::string messagestd::exception_ptr exception| Return | Name | Description |
|---|---|---|
Error inline | Default constructor; initializes all fields to a no-error state. | |
Error inline | Constructs an error with the given message string. | |
Error inline | Constructs an error with the given C string message. | |
bool | any const inline | Returns true if any error condition is set (non-zero code, non-empty message, or exception). |
void | reset inline | Clears all error fields, resetting to a no-error state. |
void | rethrow inline | Re-throws the stored exception pointer if one is set. Has no effect if exception is null. |
inline
inline Error()Default constructor; initializes all fields to a no-error state.
inline
inline Error(const std::string & msg)Constructs an error with the given message string.
msg Human-readable error description.inline
inline Error(const char * msg)Constructs an error with the given C string message.
msg Human-readable error description.const inline
inline bool any() constReturns true if any error condition is set (non-zero code, non-empty message, or exception).
True if an error is present.
inline
inline void reset()Clears all error fields, resetting to a no-error state.
inline
inline void rethrow()Re-throws the stored exception pointer if one is set. Has no effect if exception is null.