FST4 specific error passing class. More...
#include <error.hpp>
Public Member Functions | |
| fst_error (const std::string &_err, const int _errcode=0) | |
Constructs the error, prefixing _err with "[FST_ERROR!] " for the inherited std::runtime_error::what() message. | |
| int | code () const |
| returns the numeric error code supplied at construction (0 if none was given) | |
Private Attributes | |
| const int | _code |
| numeric error code supplied at construction | |
FST4 specific error passing class.
Derives from std::runtime_error, so a caller that catches std::exception (or std::runtime_error) catches every error FST4 throws; what() returns the message supplied at construction, prefixed with "[FST_ERROR!] ". The optional numeric code is diagnostic only – no FST4 component branches on it, and the same code may be reused by unrelated components, so recovery logic must not depend on it.
|
inline |
Constructs the error, prefixing _err with "[FST_ERROR!] " for the inherited std::runtime_error::what() message.
| _err | human-readable error message |
| _errcode | optional numeric error code, retrievable via code(); diagnostic only |