From 4d0da022cf73ea24d4b572504b7460a0032860bb Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 20 Jan 2026 00:47:51 -0600 Subject: [PATCH] [ox] Update error handling docs --- deps/ox/ox-docs.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/deps/ox/ox-docs.md b/deps/ox/ox-docs.md index 76e412b6..16aa470a 100644 --- a/deps/ox/ox-docs.md +++ b/deps/ox/ox-docs.md @@ -28,10 +28,7 @@ All components have a platform indicator next to them: Ox provides ```ox::Error``` to report errors. ```ox::Error``` is a struct that has overloaded operators to behave like an integer error code, plus some extra fields to enhance debuggability. -If instantiated through the ```OxError(x)``` macro, it will also include the -file and line of the error. -The ```OxError(x)``` macro should only be used for the initial instantiation of -an ```ox::Error```. +```ox::Error```s will also include the file and line of the error. In addition to ```ox::Error``` there is also the template ```ox::Result```. ```ox::Result``` simply wraps the type T value in a struct that also includes @@ -49,7 +46,7 @@ ox::Result foo(int i) noexcept { if (i < 10) { return i + 1; // implicitly calls ox::Result::Result(T) } - return OxError(1); // implicitly calls ox::Result::Result(ox::Error) + return ox::Error(1); // implicitly calls ox::Result::Result(ox::Error) } int caller1() {