Query ato_Error objects.
More...
|
typedef struct _ato_Err | ato_Err |
| The Error type.
|
|
Query ato_Error objects.
Error objects are created and attached to the current Context object, if an error occurs.
Errors can be nested - see ato_err_inner().
For a general description see Overview.
◆ ato_eErrSeverity
The severity of the error.
Enumerator |
---|
ATO_ESEVERITY_FATAL | the application may halt immediately, if not it should exit ASAP
|
ATO_ESEVERITY_ERR | the application should go into recovery mode (e.g.
restoring connections)
|
ATO_ESEVERITY_WARN | business or user level error such as invalid password, so try again
|
◆ ato_err_iserror()
ATO_EXPORT bool ato_err_iserror |
( |
ato_Err * |
err | ) |
|
Convenience method - FALSE if ATO_ERR_OK.
- Parameters
-
- Returns
- TRUE or FALSE
◆ ato_err_code()
ATO_EXPORT int ato_err_code |
( |
ato_Err * |
err | ) |
|
Get the error code.
- Parameters
-
- Returns
- the error code
◆ ato_err_codename()
ATO_EXPORT const char * ato_err_codename |
( |
ato_Err * |
err | ) |
|
Get the error code name as as string.
- Parameters
-
- Returns
- the error code name e.g. "ATO_ERR_OK" is the name for code 0.
◆ ato_err_codemsg()
ATO_EXPORT const char * ato_err_codemsg |
( |
ato_Err * |
err | ) |
|
Get the stock message defined for the given error code.
- Parameters
-
- Returns
- the error code message
◆ ato_err_severity()
Get the severity.
- Parameters
-
- Returns
- the severity
◆ ato_err_library()
ATO_EXPORT const char * ato_err_library |
( |
ato_Err * |
err | ) |
|
Get the library (string) where the error was created.
- Parameters
-
- Returns
- library name
◆ ato_err_module()
ATO_EXPORT const char * ato_err_module |
( |
ato_Err * |
err | ) |
|
Get the module (file) where the error was created.
- Parameters
-
- Returns
- module name
◆ ato_err_function()
ATO_EXPORT const char * ato_err_function |
( |
ato_Err * |
err | ) |
|
Get the function where the error was created.
- Parameters
-
- Returns
- function name
◆ ato_err_line()
ATO_EXPORT int ato_err_line |
( |
ato_Err * |
err | ) |
|
Get the line where the error was created.
- Parameters
-
- Returns
- line number
◆ ato_err_msg()
ATO_EXPORT const char * ato_err_msg |
( |
ato_Err * |
err | ) |
|
Get the message attached to the error.
- Parameters
-
- Returns
- message
◆ ato_err_inner()
Get the nested/inner error object if any.
- Parameters
-
- Returns
- inner error
◆ ato_err_custom()
ATO_EXPORT void * ato_err_custom |
( |
ato_Err * |
err | ) |
|
Get the custom object if any.
- Parameters
-
- Returns
- custom object