    

 ## On this page

  

 

 # Error Handling

 Last update: 10.02.2025 

## <a name="member-group"></a>Error Handling

<a class="anchor" id="amgrpef43236673ca0bb606b14091061ac271"></a> API to access and interpret recent data object error messages

DYNARDO\_FMOP\_API const char \* [FMOP\_getLastErrorString](group__error__handling.xhtml#ga5e19e7fe152759a80115e908c593245d) () Returns internal log messages of level warning and above. [More...](#ga5e19e7fe152759a80115e908c593245d)  
 DYNARDO\_FMOP\_API [fmop\_error\_t](group__types.xhtml#ga4847f3fa2943ffd694eb6cbe169a8bec) [FMOP\_getLastErrno](group__error__handling.xhtml#gac78d83f9f73afd90854e1d07657fc186) () Returns the error number which has been set at the last library call. [More...](#gac78d83f9f73afd90854e1d07657fc186)  
 DYNARDO\_FMOP\_API const char \* [FMOP\_getLastErrnoString](group__error__handling.xhtml#gaa838a7c375fc1d01d51636ad52a182ad) () Returns a pointer to a string that describes the error code which has been set at the last library call. [More...](#gaa838a7c375fc1d01d51636ad52a182ad)  
 DYNARDO\_FMOP\_API const char \* [FMOP\_getLastLogString](group__error__handling.xhtml#gad78d4b2f659d76cce9d16eb7b0e10e2c) () Returns internal log messages of log levels defined by FMOP\_setLogLevel. Serves as debug logger. [More...](#gad78d4b2f659d76cce9d16eb7b0e10e2c)  
 DYNARDO\_FMOP\_API int [FMOP\_setLogLevel](group__error__handling.xhtml#gac13c87c4e4d30a83f4d041a908d0a1e7) (int log\_level) Defines the new log level filter. Valid for all subsequent library calls until a new log level gets set. [More...](#gac13c87c4e4d30a83f4d041a908d0a1e7)  
 DYNARDO\_FMOP\_API const char \* [FMOP\_getErrnoString](group__error__handling.xhtml#ga7e820b85d2ef2596b00bc82445dcf650) ([fmop\_error\_t](group__types.xhtml#ga4847f3fa2943ffd694eb6cbe169a8bec) error\_num) Returns a string description for the error number given. [More...](#ga7e820b85d2ef2596b00bc82445dcf650)  
 <a id="details" name="details"></a>## Detailed Description

## Function Documentation

<a id="ga7e820b85d2ef2596b00bc82445dcf650"></a>## [◆ ](#ga7e820b85d2ef2596b00bc82445dcf650)FMOP\_getErrnoString()

 DYNARDO\_FMOP\_API const char\* FMOP\_getErrnoString  ( [fmop\_error\_t](group__types.xhtml#ga4847f3fa2943ffd694eb6cbe169a8bec)  *error\_num*) 

Returns a string description for the error number given.

Parameters \[in\]error\_numThe error number ReturnsA 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 NoteCalling 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 



<a id="gac78d83f9f73afd90854e1d07657fc186"></a>## [◆ ](#gac78d83f9f73afd90854e1d07657fc186)FMOP\_getLastErrno()

 DYNARDO\_FMOP\_API [fmop\_error\_t](group__types.xhtml#ga4847f3fa2943ffd694eb6cbe169a8bec) FMOP\_getLastErrno  ( ) 

Returns the error number which has been set at the last library call.

ReturnsThe error number which has been set at the last library call 



<a id="gaa838a7c375fc1d01d51636ad52a182ad"></a>## [◆ ](#gaa838a7c375fc1d01d51636ad52a182ad)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.

ReturnsA 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 NoteCalling this function will neither manipulate the internal log message stack nor the errno state of the last library call 



<a id="ga5e19e7fe152759a80115e908c593245d"></a>## [◆ ](#ga5e19e7fe152759a80115e908c593245d)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()](group__error__handling.xhtml#gac13c87c4e4d30a83f4d041a908d0a1e7 "Defines the new log level filter. Valid for all subsequent library calls until a new log level gets s...") can not modify it. If the internal logger is empty, the value of [FMOP\_getLastErrnoString()](group__error__handling.xhtml#gaa838a7c375fc1d01d51636ad52a182ad "Returns a pointer to a string that describes the error code which has been set at the last library ca...") will be returned

ReturnsReturns 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()](group__error__handling.xhtml#gaa838a7c375fc1d01d51636ad52a182ad "Returns a pointer to a string that describes the error code which has been set at the last library ca...") will be returned. The returned string will be overwritten by this function at its next call and will be destroyed on program termination NoteCalling this function will neither manipulate the internal log message stack nor the errno state of the last library call 



<a id="gad78d4b2f659d76cce9d16eb7b0e10e2c"></a>## [◆ ](#gad78d4b2f659d76cce9d16eb7b0e10e2c)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 ( &gt;0 ) to activate the logger and FMOP\_setLogLevel (0) to deactivate it again.

ReturnsReturns 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 NoteCalling this function will not manipulate the internal log message stack. Though the errno number will be set and can be queried calling [FMOP\_getLastErrno()](group__error__handling.xhtml#gac78d83f9f73afd90854e1d07657fc186 "Returns the error number which has been set at the last library call. ") 



<a id="gac13c87c4e4d30a83f4d041a908d0a1e7"></a>## [◆ ](#gac13c87c4e4d30a83f4d041a908d0a1e7)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\_levelDefines 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.

ReturnsThe former log level or -1 if the log\_level is unknown NoteCalling this function will not manipulate the internal log message stack. Though the errno number will be set and can be queried calling [FMOP\_getLastErrno()](group__error__handling.xhtml#gac78d83f9f73afd90854e1d07657fc186 "Returns the error number which has been set at the last library call. ")