Skip to content

Commit

Permalink
Don't print error reports in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SenRamakri committed Jul 6, 2018
1 parent 93233c4 commit a29eee4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/mbed_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ WEAK void error(const char *format, ...)

//Call handle_error/print_error_report permanently setting error_in_progress flag
handle_error(MBED_ERROR_UNKNOWN, 0, NULL, 0);
#ifndef NDEBUG
print_error_report(&last_error_ctx, "Fatal Run-time error");
#endif
error_in_progress = 1;

#ifndef NDEBUG
Expand Down Expand Up @@ -199,8 +201,10 @@ WEAK mbed_error_status_t mbed_error(mbed_error_status_t error_status, const char
return MBED_ERROR_FAILED_OPERATION;
}

#ifndef NDEBUG
//On fatal errors print the error context/report
print_error_report(&last_error_ctx, error_msg);
#endif
mbed_halt_system();

return MBED_ERROR_FAILED_OPERATION;
Expand Down

0 comments on commit a29eee4

Please sign in to comment.