mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Begin mocking os2 for windows out more
This commit is contained in:
+2
-30
@@ -11,6 +11,8 @@ General_Error :: enum u32 {
|
||||
Closed,
|
||||
|
||||
Timeout,
|
||||
|
||||
Invalid_File,
|
||||
}
|
||||
|
||||
Platform_Error :: struct {
|
||||
@@ -24,36 +26,6 @@ Error :: union {
|
||||
}
|
||||
#assert(size_of(Error) == size_of(u64))
|
||||
|
||||
Path_Error :: struct {
|
||||
op: string,
|
||||
path: string,
|
||||
err: Error,
|
||||
}
|
||||
|
||||
Link_Error :: struct {
|
||||
op: string,
|
||||
old: string,
|
||||
new: string,
|
||||
err: Error,
|
||||
}
|
||||
|
||||
path_error_delete :: proc(perr: Maybe(Path_Error)) {
|
||||
if err, ok := perr.?; ok {
|
||||
context.allocator = error_allocator()
|
||||
delete(err.op)
|
||||
delete(err.path)
|
||||
}
|
||||
}
|
||||
|
||||
link_error_delete :: proc(lerr: Maybe(Link_Error)) {
|
||||
if err, ok := lerr.?; ok {
|
||||
context.allocator = error_allocator()
|
||||
delete(err.op)
|
||||
delete(err.old)
|
||||
delete(err.new)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
is_platform_error :: proc(ferr: Error) -> (err: i32, ok: bool) {
|
||||
|
||||
Reference in New Issue
Block a user