Furi: cleanup crash use (#3175)
* Furi: optional message in furi_crash and furi_halt * Consistent furi_crash use * UnitTests: crash instead of assert * furi: check: fixed macro for default arg * unit_tests: fixed crashes everywhere * lib: infrared: fixed PVS warnings * furi: eliminated __FURI_ASSERT_MESSAGE_FLAG * Furi: update check.h docs * Furi: add check.h usage note * Docs: grammar --------- Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
@@ -48,7 +48,7 @@ bool infrared_scene_edit_button_select_on_event(void* context, SceneManagerEvent
|
||||
} else if(edit_mode == InfraredEditModeDelete) {
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneEditDelete);
|
||||
} else {
|
||||
furi_assert(0);
|
||||
furi_crash();
|
||||
}
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ void infrared_scene_edit_delete_on_enter(void* context) {
|
||||
infrared_remote_get_name(remote),
|
||||
infrared_remote_get_signal_count(remote));
|
||||
} else {
|
||||
furi_assert(0);
|
||||
furi_crash();
|
||||
}
|
||||
|
||||
dialog_ex_set_text(dialog_ex, infrared->text_store[0], 64, 31, AlignCenter, AlignCenter);
|
||||
@@ -101,7 +101,7 @@ bool infrared_scene_edit_delete_on_event(void* context, SceneManagerEvent event)
|
||||
success = infrared_remote_remove(remote);
|
||||
app_state->current_button_index = InfraredButtonIndexNone;
|
||||
} else {
|
||||
furi_crash(NULL);
|
||||
furi_crash();
|
||||
}
|
||||
|
||||
if(success) {
|
||||
|
||||
@@ -33,7 +33,7 @@ bool infrared_scene_edit_delete_done_on_event(void* context, SceneManagerEvent e
|
||||
view_dispatcher_stop(infrared->view_dispatcher);
|
||||
}
|
||||
} else {
|
||||
furi_assert(0);
|
||||
furi_crash();
|
||||
}
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ void infrared_scene_edit_rename_on_enter(void* context) {
|
||||
|
||||
furi_string_free(folder_path);
|
||||
} else {
|
||||
furi_crash(NULL);
|
||||
furi_crash();
|
||||
}
|
||||
|
||||
text_input_set_result_callback(
|
||||
@@ -81,7 +81,7 @@ bool infrared_scene_edit_rename_on_event(void* context, SceneManagerEvent event)
|
||||
} else if(edit_target == InfraredEditTargetRemote) {
|
||||
success = infrared_rename_current_remote(infrared, infrared->text_store[0]);
|
||||
} else {
|
||||
furi_crash(NULL);
|
||||
furi_crash();
|
||||
}
|
||||
|
||||
if(success) {
|
||||
|
||||
Reference in New Issue
Block a user