License
BSD-3-Clause
Fiber I/O Exception Types
This module provides exception types used by fiber-based I/O wrappers (FiberSocket, FiberFile). It is separate from the individual wrapper modules to avoid circular dependencies between them.
Exception thrown when a fiber I/O operation fails.
Carries the OS error number (errno on POSIX, GetLastError on Windows) so the caller can distinguish between connection refused, timeout, permission denied, and other retryable vs.\ fatal conditions.
Example:
try {
sock.connect("example.com", 80);
} catch (FiberIoException e) {
if (e.errno == ECONNREFUSED)
logRetryable(e);
else
logFatal(e);
}int errno_OS-level error number associated with the failure.string reasonName of the operation-specific failure reason, when the failure originated from a `Result`-based API (for example `ConnectErrorReason.CONNECTION_REFUSED`). Empty when no reason was available.this(string msg, int errno_ = 0, string reason = "", string file = __FILE__,
size_t line = __LINE__)Construct a fiber I/O exception.