@@ -153,9 +153,9 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
153
153
current_error_ctx .error_status = error_status ;
154
154
current_error_ctx .error_value = error_value ;
155
155
bool bHWException = (error_status == MBED_ERROR_MEMMANAGE_EXCEPTION ||
156
- error_status == MBED_ERROR_BUSFAULT_EXCEPTION ||
157
- error_status == MBED_ERROR_USAGEFAULT_EXCEPTION ||
158
- error_status == MBED_ERROR_HARDFAULT_EXCEPTION );
156
+ error_status == MBED_ERROR_BUSFAULT_EXCEPTION ||
157
+ error_status == MBED_ERROR_USAGEFAULT_EXCEPTION ||
158
+ error_status == MBED_ERROR_HARDFAULT_EXCEPTION );
159
159
mbed_fault_context_t * mfc = NULL ;
160
160
if (bHWException ) {
161
161
mfc = (mbed_fault_context_t * )error_value ;
@@ -169,16 +169,13 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
169
169
}
170
170
171
171
#ifdef MBED_CONF_RTOS_PRESENT
172
- if (mfc && !(mfc -> EXC_RETURN & 0x4 ))
173
- {
172
+ if (mfc && !(mfc -> EXC_RETURN & 0x4 )) {
174
173
// handler mode
175
174
current_error_ctx .thread_id = 0 ;
176
175
current_error_ctx .thread_entry_address = 0 ;
177
176
current_error_ctx .thread_stack_size = MAX (0 , INITIAL_SP - current_error_ctx .thread_current_sp - sizeof (int ));
178
177
current_error_ctx .thread_stack_mem = current_error_ctx .thread_current_sp ;
179
- }
180
- else
181
- {
178
+ } else {
182
179
// Capture thread info in thread mode
183
180
osRtxThread_t * current_thread = osRtxInfo .thread .run .curr ;
184
181
current_error_ctx .thread_id = (uint32_t )current_thread ;
@@ -470,8 +467,9 @@ mbed_error_status_t mbed_clear_all_errors(void)
470
467
471
468
static inline const char * name_or_unnamed (const osRtxThread_t * thread )
472
469
{
473
- if (!thread )
470
+ if (!thread ) {
474
471
return "<handler>" ;
472
+ }
475
473
476
474
const char * name = thread -> name ;
477
475
return name ? name : "<unnamed>" ;
0 commit comments