docs: change wording
This commit is contained in:
@@ -111,8 +111,8 @@ The assert module provides diagnostic macros made to trap critical logic failure
|
|||||||
#### Macros and their behavior
|
#### Macros and their behavior
|
||||||
| Macro | Debug Mode (`_DEBUG`) | Release Mode |
|
| 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`. |
|
| `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 interactive modal error box, breaks execution, and terminates. | Logs the error, displays an interactive modal error box, breaks execution, and terminates. **Always halts execution.** |
|
| `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
|
#### Example
|
||||||
```c++
|
```c++
|
||||||
#include <seallib/assert.h>
|
#include <seallib/assert.h>
|
||||||
@@ -145,7 +145,7 @@ void processNetworkPacket(int packetId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
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);
|
processSystemData(nullptr, -1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user