Report status of all API calls.
More...
#include <api_status.h>
|
| api_status () |
|
int | get_error_code () const |
| (api_error_codes) Get the error code All API calls will return a status code. If the optional api_status object is passed in, the code is set in the object also. More...
|
|
const char * | get_error_msg () const |
| (api_error_codes) Get the error msg string All API calls will return a status code. If the optional api_status object is passed in, the detailed error description is passed back using get_error_msg() More...
|
|
|
static void | try_update (api_status *status, int new_code, const char *new_msg) |
| Helper method for returning error object Checks to see if api_status is not null before setting the error code and error message. More...
|
|
static void | try_clear (api_status *status) |
| Helper method to clear the error object Checks to see if api_status is not null before clearing current values. More...
|
|
Report status of all API calls.
◆ api_status()
VW::experimental::api_status::api_status |
( |
| ) |
|
◆ get_error_code()
int VW::experimental::api_status::get_error_code |
( |
| ) |
const |
(api_error_codes) Get the error code All API calls will return a status code. If the optional api_status object is passed in, the code is set in the object also.
- Returns
- int Error code
◆ get_error_msg()
const char * VW::experimental::api_status::get_error_msg |
( |
| ) |
const |
(api_error_codes) Get the error msg string All API calls will return a status code. If the optional api_status object is passed in, the detailed error description is passed back using get_error_msg()
- Returns
- const char* Error description
◆ try_clear()
static void VW::experimental::api_status::try_clear |
( |
api_status * |
status | ) |
|
|
static |
Helper method to clear the error object Checks to see if api_status is not null before clearing current values.
- Parameters
-
status | Error object. Could be null. |
◆ try_update()
static void VW::experimental::api_status::try_update |
( |
api_status * |
status, |
|
|
int |
new_code, |
|
|
const char * |
new_msg |
|
) |
| |
|
static |
Helper method for returning error object Checks to see if api_status is not null before setting the error code and error message.
- Parameters
-
status | Error object. Could be null. |
new_code | Error code to set if status object is not null |
new_msg | Error description to set if status object is not null |
The documentation for this class was generated from the following file:
- /nix/store/2saqbz278bj3pvhbfxlcc50cjbvs3h0h-source/vowpalwabbit/core/include/vw/core/api_status.h