Add more ErrorKind
s
#130193
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
A-io
Area: `std::io`, `std::fs`, `std::net` and `std::path`
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Misc UNIX
Originally posted by zackw in #79965 (comment)
I am surprised to see
EMFILE
,ENFILE
,ENOMEM
,ENOEXEC
,EIO
,ENOTTY
,ENXIO
,ENODEV
,EOPNOTSUPP
,ESRCH
,ECHILD
, andEINPROGRESS
dismissed as unlikely to occur, or only relevant to people doing highly Unix-specific tasks. They can all happen at least as easily as some of the other situations for which codes are being added. I'd recommend all of these be added, with the following friendly names and descriptions. Some of them should be lumped together, however.EIO
:PhysicalIOError
, "Data could not be input or output due to a hardware failure, such as a bad disk sector."ESRCH
andECHILD
:ProcessNotFound
(or lump with the existingNotFound
). "A process was not found" seems too vague and short, but the existing description forNotFound
is also vague and short, so 🤷♂️EINPROGRESS
:InProgress
. "An operation has begun, and will complete later. It is not yet known whether it will succeed."EMFILE
andENFILE
:TooManyOpenFiles
. "The process cannot open any more files without closing some first, or the system as a whole cannot handle any more simultaneously open files."ENOMEM
:NotEnoughMemory
. "The system does not have enough free memory to satisfy an allocation request. This can happen either because all of RAM is already allocated, or because the request was for more memory than the computer has."ENOEXEC
:InvalidExecutable
. "A machine-language program is either corrupt or cannot be executed on this CPU (e.g. it is machine code for some other type of CPU)."ENOTTY
,ENXIO
,ENODEV
,EOPNOTSUPP
:NotOperable
, "This operation cannot be applied to this type of file or device. For example, changing terminal settings on something other than a terminal device."EMFILE
specificallyWas requested at least a couple of times
(I was not even looking for those, just noticed the reoccurring request while gathering info for the few previous issues I've opened.)
The text was updated successfully, but these errors were encountered: