Struct SystemErrorCode
A tagged union that holds an error code from system apis, meaning one from Windows GetLastError() or C's errno.
You construct it with SystemErrorCode(thing) and the overloaded constructor tags and stores it.
Constructors
| Name | Description |
this
(errno)
|
C/unix error are typed as signed ints...
Windows' errors are typed DWORD, aka unsigned...
|
Methods
| Name | Description |
codeAsString
()
|
The numeric code itself as a string.
|
errorString
()
|
A text explanation of the code. See [codeAsString] for a string representation of the numeric representation.
|
toString
()
|
Constructs a string containing both the code and the explanation string.
|
wasSuccessful
()
|
Returns if the code indicated success.
|