#include <evo/impl/sys.h>
Evo base exception class.
◆ ErrorMsgFunc
typedef const char*(* ErrorMsgFunc) (Error) |
|
protected |
Pointer type to function returning error message from error code.
◆ StringBase
◆ Exception() [1/3]
Constructor with file/line info.
- Parameters
-
file | Exception file name (use FILE macro) |
line | Exception line number (use LINE macro) |
msg | Exception message |
error | Error code, EUnknown if unknown |
◆ Exception() [2/3]
Copy constructor.
- Parameters
-
◆ ~Exception()
◆ Exception() [3/3]
Constructor with exception type.
Use EVO_THROW() or EVO_THROW_E() macro to throw exception.
- Parameters
-
file | Exception file name |
line | Exception line number |
type | Exception type as string, used as msg prefix |
msg | Exception message |
error | Error code, EUnknown if unknown |
errmsg_func | Error message function to use |
◆ error()
Get error code.
- Returns
- Error code, 0 if unknown
◆ errormsg_out()
TOut& errormsg_out |
( |
TOut & |
out | ) |
|
|
inline |
Write error message with errno to output stream/string.
- Must call right after the error, otherwise errno may be overwritten
- Template Parameters
-
TOut | Output stream or string type |
- Parameters
-
- Returns
- This
◆ file()
const char* file |
( |
| ) |
const |
|
inline |
Get exception file name.
- Returns
- File name
◆ line()
Get exception line number.
- Returns
- Line number
◆ msg()
const char* msg |
( |
| ) |
const |
|
inline |
Get exception message.
- Returns
- Message
The documentation for this class was generated from the following file: