Merge commit '22e6299e90e85cb2b5ee814ebf2324b1a74d7091'

This commit is contained in:
2024-04-24 23:12:54 -05:00
184 changed files with 1262 additions and 418 deletions

View File

@ -222,8 +222,8 @@ int caller2() {
```
Lastly, there are a few macros available to help in passing ```ox::Error```s
back up the call stack, ```oxReturnError```, ```oxThrowError```,
```oxIgnoreError```, and ```oxRequire```.
back up the call stack, ```oxReturnError```, ```oxThrowError```, and
```oxRequire```.
```oxReturnError``` is by far the more helpful of the two.
```oxReturnError``` will return an ```ox::Error``` if it is not 0 and
@ -232,13 +232,10 @@ Because exceptions are disabled for GBA builds and thus cannot be used in the
engine, ```oxThrowError``` is only really useful at the boundary between
engine libraries and Nostalgia Studio.
```oxIgnoreError``` does what it says, it ignores the error.
Since ```ox::Error``` is always nodiscard, you must do something with them.
In extremely rare cases, you may not have anything you can do with them or you
may know the code will never fail in that particular instance.
This should be used very sparingly.
At the time of this writing, it has only been used 4 times in 20,000 lines of
code.
In rare cases, you may not have anything you can do with them or you may know
the code will never fail in that particular instance.
This should be used sparingly.
```cpp
@ -257,7 +254,7 @@ ox::Error engineCode() noexcept {
void anyCode() {
auto [val, err] = foo(1);
oxIgnoreError(err);
std::ignore = err;
doStuff(val);
}
```