Try to map to General_Error where possible

This commit is contained in:
gingerBill
2024-08-04 11:44:45 +01:00
parent 28666414bc
commit def2e2e271
8 changed files with 103 additions and 7 deletions
+2 -1
View File
@@ -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 ""