#[non_exhaustive]#[repr(i32)]pub enum AxError {
Show 24 variants
AddrInUse = 1,
AlreadyExists = 2,
BadAddress = 3,
BadState = 4,
ConnectionRefused = 5,
ConnectionReset = 6,
DirectoryNotEmpty = 7,
InvalidData = 8,
InvalidInput = 9,
Io = 10,
IsADirectory = 11,
NoMemory = 12,
NotADirectory = 13,
NotConnected = 14,
NotFound = 15,
PermissionDenied = 16,
ResourceBusy = 17,
StorageFull = 18,
UnexpectedEof = 19,
Unsupported = 20,
WouldBlock = 21,
WriteZero = 22,
Interrupted = 23,
Timeout = 24,
}
Expand description
The error type used by ArceOS.
Similar to std::io::ErrorKind
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AddrInUse = 1
A socket address could not be bound because the address is already in use elsewhere.
AlreadyExists = 2
An entity already exists, often a file.
BadAddress = 3
Bad address.
BadState = 4
Bad internal state.
ConnectionRefused = 5
The connection was refused by the remote server,
ConnectionReset = 6
The connection was reset by the remote server.
DirectoryNotEmpty = 7
A non-empty directory was specified where an empty directory was expected.
InvalidData = 8
Data not valid for the operation were encountered.
Unlike InvalidInput
, this typically means that the operation
parameters were valid, however the error was caused by malformed
input data.
For example, a function that reads a file into a string will error with
InvalidData
if the file’s contents are not valid UTF-8.
InvalidInput = 9
Invalid parameter/argument.
Io = 10
Input/output error.
IsADirectory = 11
The filesystem object is, unexpectedly, a directory.
NoMemory = 12
Not enough space/cannot allocate memory.
NotADirectory = 13
A filesystem object is, unexpectedly, not a directory.
NotConnected = 14
The network operation failed because it was not connected yet.
NotFound = 15
The requested entity is not found.
PermissionDenied = 16
The operation lacked the necessary privileges to complete.
ResourceBusy = 17
Device or resource is busy.
StorageFull = 18
The underlying storage (typically, a filesystem) is full.
UnexpectedEof = 19
An error returned when an operation could not be completed because an “end of file” was reached prematurely.
Unsupported = 20
This operation is unsupported or unimplemented.
WouldBlock = 21
The operation needs to block to complete, but the blocking operation was requested to not occur.
WriteZero = 22
An error returned when an operation could not be completed because a
call to write()
returned Ok(0)
.
Interrupted = 23
Syscall interrupted by a caught signal
Timeout = 24
Syscall timed out