aboutsummaryrefslogtreecommitdiff
path: root/core/os/os2/errors.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-08-04 11:44:45 +0100
committergingerBill <bill@gingerbill.org>2024-08-04 11:44:45 +0100
commitdef2e2e27112e4cc745afaa89a03857e01c5aabd (patch)
treee8a7deddf9f7c3cef5f685ab9b8c5ac3e9a561a0 /core/os/os2/errors.odin
parent28666414bc767c99c5d157f64e41b18b06082e42 (diff)
Try to map to `General_Error` where possible
Diffstat (limited to 'core/os/os2/errors.odin')
-rw-r--r--core/os/os2/errors.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/os/os2/errors.odin b/core/os/os2/errors.odin
index 2b9b3528e..bc51bb1e8 100644
--- a/core/os/os2/errors.odin
+++ b/core/os/os2/errors.odin
@@ -42,13 +42,14 @@ Error :: union #shared_nil {
ERROR_NONE :: Error{}
-
+@(require_results)
is_platform_error :: proc(ferr: Error) -> (err: i32, ok: bool) {
v := ferr.(Platform_Error) or_else {}
return i32(v), i32(v) != 0
}
+@(require_results)
error_string :: proc(ferr: Error) -> string {
if ferr == nil {
return ""