diff --git a/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp b/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp index baea5f2..4b046d7 100644 --- a/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp +++ b/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp @@ -26,7 +26,11 @@ { fprintf(stderr, "mbed assertation failed: %s, file: %s, line %d \n", expr, file, line); if (mbed_assert_throw_errors) { +#ifdef __EXCEPTIONS throw 1; +#else + FAIL(); +#endif } /* Ensure we fail the unit test if the Mbed assertion fails. Without this,