Skip to main content

Error codes

To get the textual representation of an error code, several conditions must be met:

  • The __ERROR_LOOKUP_TABLE__ build flag is not set.

  • The __ENABLE_LOOKUP_TABLE__ build flag is set.

  • The __ENABLE_MOCANA_DEBUG_CONSOLE__ build flag is set.

  • The debug console output has been set up. Use the __MOCANA_DUMP_CONSOLE_TO_STDOUT__ build flag to send all output to stdout.

Once all of these have been met, get the text corresponding to an error code using the DISPLAY_ERROR macro:

MSTATUS status = MOCANA_initMocana(void);
if (OK != status)