Compare commits

...

1 Commits

Author SHA1 Message Date
neru a8796feb37 docs: change wording 2026-05-21 13:14:51 -03:00
+3 -3
View File
@@ -111,8 +111,8 @@ The assert module provides diagnostic macros made to trap critical logic failure
#### Macros and their behavior
| Macro | Debug Mode (`_DEBUG`) | Release Mode |
| :--- | :--- | :--- |
| `ASSERT(cond, msg)` | Evaluates `cond`. If `false`, logs the error location, pops up an interactive modal error box, drops a debugger breakpoint trap, and calls `std::exit`. | Evaluates to a compiler optimization hint informing the optimizer that `cond` is always `true`. |
| `PANIC(msg)` | Logs the error, displays an interactive modal error box, breaks execution, and terminates. | Logs the error, displays an interactive modal error box, breaks execution, and terminates. **Always halts execution.** |
| `ASSERT(cond, msg)` | Evaluates `cond`. If `false`, logs the error location, pops up an error box, drops a debugger breakpoint trap, and calls `std::exit`. | Evaluates to a compiler optimization hint informing the optimizer that `cond` is always `true`. |
| `PANIC(msg)` | Logs the error, displays an error box, breaks execution, and terminates. | Logs the error, displays an error box, breaks execution, and terminates. **Always halts execution.** |
#### Example
```c++
#include <seallib/assert.h>
@@ -145,7 +145,7 @@ void processNetworkPacket(int packetId) {
}
int main() {
// Fails in debug: triggers a modal error window detailing the file and line number
// Fails in debug: displays an error window detailing the file and line number
processSystemData(nullptr, -1);
return 0;