Error Handling
Last update: 10.02.2025Error Handling | |
API to access and interpret recent data object error messages | |
| DYNARDO_FMOP_API const char * | FMOP_getLastErrorString () |
| Returns internal log messages of level warning and above. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getLastErrno () |
| Returns the error number which has been set at the last library call. More... | |
| DYNARDO_FMOP_API const char * | FMOP_getLastErrnoString () |
| Returns a pointer to a string that describes the error code which has been set at the last library call. More... | |
| DYNARDO_FMOP_API const char * | FMOP_getLastLogString () |
| Returns internal log messages of log levels defined by FMOP_setLogLevel. Serves as debug logger. More... | |
| DYNARDO_FMOP_API int | FMOP_setLogLevel (int log_level) |
| Defines the new log level filter. Valid for all subsequent library calls until a new log level gets set. More... | |
| DYNARDO_FMOP_API const char * | FMOP_getErrnoString (fmop_error_t error_num) |
| Returns a string description for the error number given. More... | |
Detailed Description
Function Documentation
◆ FMOP_getErrnoString()
| DYNARDO_FMOP_API const char* FMOP_getErrnoString | ( | fmop_error_t | error_num | ) |
Returns a string description for the error number given.
- Parameters
-
[in] error_num The error number
- Returns
- A human readable string description for the error number given.The returned string will be overwritten by this function at the next call and will be destroyed on program termination
- Note
- Calling this function will neither manipulate the internal log message stack nor the errno state of the last library call
- DON'T USE ERRNO as agrument identifier as this seems to be defined as a macro identifier Refer to http://www.cplusplus.com/reference/cerrno/errno/ for details
◆ FMOP_getLastErrno()
| DYNARDO_FMOP_API fmop_error_t FMOP_getLastErrno | ( | ) |
Returns the error number which has been set at the last library call.
- Returns
- The error number which has been set at the last library call
◆ FMOP_getLastErrnoString()
| DYNARDO_FMOP_API const char* FMOP_getLastErrnoString | ( | ) |
Returns a pointer to a string that describes the error code which has been set at the last library call.
- Returns
- A human readable string description for the error code that has been set at the last library call. The returned string will be overwritten by this function at the next call and will be destroyed on program termination
- Note
- Calling this function will neither manipulate the internal log message stack nor the errno state of the last library call
◆ FMOP_getLastErrorString()
| DYNARDO_FMOP_API const char* FMOP_getLastErrorString | ( | ) |
Returns internal log messages of level warning and above.
This log level is immutable. FMOP_setLogLevel() can not modify it. If the internal logger is empty, the value of FMOP_getLastErrnoString() will be returned
- Returns
- Returns all internal, formatted log messages of log level warning and above if either a warning or an error message occured during the last library call. Otherwise the return value of FMOP_getLastErrnoString() will be returned. The returned string will be overwritten by this function at its next call and will be destroyed on program termination
- Note
- Calling this function will neither manipulate the internal log message stack nor the errno state of the last library call
◆ FMOP_getLastLogString()
| DYNARDO_FMOP_API const char* FMOP_getLastLogString | ( | ) |
Returns internal log messages of log levels defined by FMOP_setLogLevel. Serves as debug logger.
Initially all log levels are deactivated and no log messages will be buffered. Call FMOP_setLogLevel ( >0 ) to activate the logger and FMOP_setLogLevel (0) to deactivate it again.
- Returns
- Returns all internal, formatted log messages of the last library call. The returned string will be overwritten by this function at the next call and will be destroyed on program termination
- Note
- Calling this function will not manipulate the internal log message stack. Though the errno number will be set and can be queried calling FMOP_getLastErrno()
◆ FMOP_setLogLevel()
| DYNARDO_FMOP_API int FMOP_setLogLevel | ( | int | log_level | ) |
Defines the new log level filter. Valid for all subsequent library calls until a new log level gets set.
- Parameters
-
[in] log_level Defines the new log level filter for messages returned by FMOP_getLastLog. Accepts the following integer values only: - 0 ... filter all log levels
- 1 ... return only log messages of log level ERROR
- 2 ... return only log messages of log level WARNING and below
- 3 ... return only log messages of log level INFO and below
- 4 ... return only log messages of log level DEBUG and below
- 5 ... return all log messages, i.e. ERROR, WARNING INFO, DEBUG, TRACE. The log level TRACE is not existing in maintenance, i.e. in customer builds.
- Returns
- The former log level or -1 if the log_level is unknown
- Note
- Calling this function will not manipulate the internal log message stack. Though the errno number will be set and can be queried calling FMOP_getLastErrno()