Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: platform/mbed_error.c
- Revision:
- 167:e84263d55307
- Parent:
- 160:d5399cc887bb
--- a/platform/mbed_error.c Thu Jun 08 15:02:37 2017 +0100 +++ b/platform/mbed_error.c Wed Jun 21 17:46:44 2017 +0100 @@ -23,7 +23,16 @@ #include <stdio.h> #endif +static uint8_t error_in_progress = 0; + WEAK void error(const char* format, ...) { + + // Prevent recursion if error is called again + if (error_in_progress) { + return; + } + error_in_progress = 1; + #ifndef NDEBUG va_list arg; va_start(arg, format);