Misuse of IM_ASSERT_USER_ERROR
- Dominant language
- C++
- Stars
- 6.2k
- Forks
- 693
- PR merge metrics
- No merged PRs in 30d
Description
`IM_ASSERT_USER_ERROR()` was designed to specifically cover errors that are safely recoverable.
So e.g.
```
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"); // get plot and axis
ImPlotPlot& plot = *gp.CurrentPlot;
```
The `gp.CurrentPlot != nullptr` part of it is incorrect.
I suggest not to take action right now as I am in the process of reworking this system to provide new error handling mechanisms.
I will try to post some update here eventually, but felt it was safer to leave the info down here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.