mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Remove error baselines from Errno to make fmt clearer
This commit is contained in:
+17
-17
@@ -8,24 +8,24 @@ foreign import libroot "system:c"
|
|||||||
USE_POSITIVE_POSIX_ERRORS :: posix._HAIKU_USE_POSITIVE_POSIX_ERRORS
|
USE_POSITIVE_POSIX_ERRORS :: posix._HAIKU_USE_POSITIVE_POSIX_ERRORS
|
||||||
POSIX_ERROR_FACTOR :: posix._POSIX_ERROR_FACTOR
|
POSIX_ERROR_FACTOR :: posix._POSIX_ERROR_FACTOR
|
||||||
|
|
||||||
|
// Error baselines
|
||||||
|
GENERAL_ERROR_BASE :: min(i32)
|
||||||
|
OS_ERROR_BASE :: GENERAL_ERROR_BASE + 0x1000
|
||||||
|
APP_ERROR_BASE :: GENERAL_ERROR_BASE + 0x2000
|
||||||
|
INTERFACE_ERROR_BASE :: GENERAL_ERROR_BASE + 0x3000
|
||||||
|
MEDIA_ERROR_BASE :: GENERAL_ERROR_BASE + 0x4000
|
||||||
|
TRANSLATION_ERROR_BASE :: GENERAL_ERROR_BASE + 0x4800
|
||||||
|
MIDI_ERROR_BASE :: GENERAL_ERROR_BASE + 0x5000
|
||||||
|
STORAGE_ERROR_BASE :: GENERAL_ERROR_BASE + 0x6000
|
||||||
|
POSIX_ERROR_BASE :: GENERAL_ERROR_BASE + 0x7000
|
||||||
|
MAIL_ERROR_BASE :: GENERAL_ERROR_BASE + 0x8000
|
||||||
|
PRINT_ERROR_BASE :: GENERAL_ERROR_BASE + 0x9000
|
||||||
|
DEVICE_ERROR_BASE :: GENERAL_ERROR_BASE + 0xA000
|
||||||
|
|
||||||
|
// Developer-defined errors start at (ERRORS_END+1)
|
||||||
|
ERRORS_END :: GENERAL_ERROR_BASE + 0xFFFF
|
||||||
|
|
||||||
Errno :: enum i32 {
|
Errno :: enum i32 {
|
||||||
// Error baselines
|
|
||||||
GENERAL_ERROR_BASE = min(i32),
|
|
||||||
OS_ERROR_BASE = GENERAL_ERROR_BASE + 0x1000,
|
|
||||||
APP_ERROR_BASE = GENERAL_ERROR_BASE + 0x2000,
|
|
||||||
INTERFACE_ERROR_BASE = GENERAL_ERROR_BASE + 0x3000,
|
|
||||||
MEDIA_ERROR_BASE = GENERAL_ERROR_BASE + 0x4000,
|
|
||||||
TRANSLATION_ERROR_BASE = GENERAL_ERROR_BASE + 0x4800,
|
|
||||||
MIDI_ERROR_BASE = GENERAL_ERROR_BASE + 0x5000,
|
|
||||||
STORAGE_ERROR_BASE = GENERAL_ERROR_BASE + 0x6000,
|
|
||||||
POSIX_ERROR_BASE = GENERAL_ERROR_BASE + 0x7000,
|
|
||||||
MAIL_ERROR_BASE = GENERAL_ERROR_BASE + 0x8000,
|
|
||||||
PRINT_ERROR_BASE = GENERAL_ERROR_BASE + 0x9000,
|
|
||||||
DEVICE_ERROR_BASE = GENERAL_ERROR_BASE + 0xA000,
|
|
||||||
|
|
||||||
// Developer-defined errors start at (ERRORS_END+1)
|
|
||||||
ERRORS_END = GENERAL_ERROR_BASE + 0xFFFF,
|
|
||||||
|
|
||||||
// General Errors
|
// General Errors
|
||||||
NO_MEMORY = GENERAL_ERROR_BASE + 0,
|
NO_MEMORY = GENERAL_ERROR_BASE + 0,
|
||||||
IO_ERROR = GENERAL_ERROR_BASE + 1,
|
IO_ERROR = GENERAL_ERROR_BASE + 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user