1
0
mirror of https://github.com/ocornut/imgui.git synced 2025-02-25 14:34:40 +01:00

Updated Error Handling (markdown)

omar 2024-09-30 11:59:15 +02:00
parent 7213c769e0
commit 4b1a4a614d

@ -4,7 +4,9 @@ Since Dear ImGui 1.91.3 we provide way to configure how to handle _SOME_ recover
![image](https://github.com/user-attachments/assets/2c46c666-3d85-4355-b80a-730c7b748d9d) ![image](https://github.com/user-attachments/assets/2c46c666-3d85-4355-b80a-730c7b748d9d)
- Error recovery is provided as a way to facilitate recovery from errors in e.g. scripting languages, or after specific exceptions handlers. - Error recovery is provided as a way to facilitate recovery:
- After a programming error (native code or scripting language - the later tends to facilitate iterating on code while running).
- After running an exception handler or any error processing which may skip code after an error has been detected.
- Error recovery is not perfect nor guaranteed! You are not supposed to rely on it in the course of a normal application run. - Error recovery is not perfect nor guaranteed! You are not supposed to rely on it in the course of a normal application run.
- By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked. - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked.
- Always ensure that on programmers seat you have at minimum Asserts or Tooltips enabled when making direct imgui API call! Otherwise it would severely hinder your ability to catch and correct mistakes! - Always ensure that on programmers seat you have at minimum Asserts or Tooltips enabled when making direct imgui API call! Otherwise it would severely hinder your ability to catch and correct mistakes!
@ -12,7 +14,7 @@ Since Dear ImGui 1.91.3 we provide way to configure how to handle _SOME_ recover
Typical scenarios: Typical scenarios:
#### (1) Programmer seats (current default) #### (1) Programmer seats (current default)
- Recoverable errors will call IM_ASSERT_USER_ERROR(), leading to IM_ASSERT() being executed. - Recoverable errors will call `IM_ASSERT_USER_ERROR()`, leading to `IM_ASSERT()` being executed.
- If you can resume execution from your assert, recovery will generally be performed. - If you can resume execution from your assert, recovery will generally be performed.
- If you can configure your assert to be ignored, recover will generally be performed and the error tooltip will be visible. - If you can configure your assert to be ignored, recover will generally be performed and the error tooltip will be visible.