Module

Ruby exception objects are subclasses of Exception. However, operating systems typically report errors using plain integers. Module Errno is created dynamically to map these operating system errors to Ruby classes, with each error number generating its own subclass of SystemCallError. As the subclass is created in module Errno, its name will start Errno::.

The names of the Errno:: classes depend on the environment in which Ruby runs. On a typical Unix or Windows platform, there are Errno classes such as Errno::EACCES, Errno::EAGAIN, Errno::EINTR, and so on.

The integer operating system error number corresponding to a particular error is available as the class constant Errno::error::Errno.

Errno::EACCES::Errno   #=> 13
Errno::EAGAIN::Errno   #=> 11
Errno::EINTR::Errno    #=> 4

The full list of operating system errors on your particular platform are available as the constants of Errno.

Errno.constants   #=> :E2BIG, :EACCES, :EADDRINUSE, :EADDRNOTAVAIL, ...
Constants

No error

“Argument list too long” error

“Permission denied” error

“Address in use” error

“Address not available” error

EADV error

“Address family not supported” error

“Resource unavailable, try again (may be the same value as [EWOULDBLOCK])” error

“Connection already in progress” error

EAUTH error

EBADARCH error

EBADE error

EBADEXEC error

“Bad file descriptor” error

EBADFD error

EBADMACHO error

“Bad message” error

EBADR error

EBADRPC error

EBADRQC error

EBADSLT error

EBFONT error

“Device or resource busy” error

“Operation canceled” error

ECAPMODE error

“No child processes” error

ECHRNG error

ECOMM error

“Connection aborted” error

“Connection refused” error

“Connection reset” error

“Resource deadlock would occur” error

EDEADLOCK error

“Destination address required” error

EDEVERR error

“Mathematics argument out of domain of function” error

EDOOFUS error

EDOTDOT error

“Reserved” error

“File exists” error

“Bad address” error

“File too large” error

EFTYPE error

EHOSTDOWN error

“Host is unreachable” error

EHWPOISON error

“Identifier removed” error

“Illegal byte sequence” error

“Operation in progress” error

“Interrupted function” error

“Invalid argument” error

EIO

“I/O error” error

EIPSEC error

“Socket is connected” error

“Is a directory” error

EISNAM error

EKEYEXPIRED error

EKEYREJECTED error

EKEYREVOKED error

EL2HLT error

EL2NSYNC error

EL3HLT error

EL3RST error

ELIBACC error

ELIBBAD error

ELIBEXEC error

ELIBMAX error

ELIBSCN error

ELNRNG error

“Too many levels of symbolic links” error

EMEDIUMTYPE error

“File descriptor value too large” error

“Too many links” error

“Message too large” error

“Reserved” error

“Filename too long” error

ENAVAIL error

ENEEDAUTH error

“Network is down” error

“Connection aborted by network” error

“Network unreachable” error

“Too many files open in system” error

ENOANO error

ENOATTR error

“No buffer space available” error

ENOCSI error

“[OB XSR] [Option Start] No message is available on the STREAM head read queue [Option End]” error

“No such device” error

“No such file or directory” error

“Executable file format error” error

ENOKEY error

“No locks available” error

“Reserved” error

ENOMEDIUM error

“Not enough space” error

“No message of the desired type” error

ENONET error

ENOPKG error

ENOPOLICY error

“Protocol not available” error

“No space left on device” error

“[OB XSR] [Option Start] No STREAM resources [Option End]” error

“[OB XSR] [Option Start] Not a STREAM [Option End]” error

“Functionality not supported” error

ENOTBLK error

ENOTCAPABLE error

“The socket is not connected” error

“Not a directory or a symbolic link to a directory” error

“Directory not empty” error

ENOTNAM error

“State not recoverable” error

“Not a socket” error

“Not supported (may be the same value as [EOPNOTSUPP])” error

“Inappropriate I/O control operation” error

ENOTUNIQ error

“No such device or address” error

“Operation not supported on socket (may be the same value as [ENOTSUP])” error

“Value too large to be stored in data type” error

“Previous owner died” error

“Operation not permitted” error

EPFNOSUPPORT error

“Broken pipe” error

EPROCLIM error

EPROCUNAVAIL error

EPROGMISMATCH error

EPROGUNAVAIL error

“Protocol error” error

“Protocol not supported” error

“Protocol wrong type for socket” error

EPWROFF error

EQFULL error

“Result too large” error

EREMCHG error

EREMOTE error

EREMOTEIO error

ERESTART error

ERFKILL error

“Read-only file system” error

ERPCMISMATCH error

ESHLIBVERS error

ESHUTDOWN error

ESOCKTNOSUPPORT error

“Invalid seek” error

“No such process” error

ESRMNT error

“Reserved” error

ESTRPIPE error

“[OB XSR] [Option Start] Stream ioctl() timeout [Option End]” error

“Connection timed out” error

ETOOMANYREFS error

“Text file busy” error

EUCLEAN error

EUNATCH error

EUSERS error

“Operation would block (may be the same value as [EAGAIN])” error

“Cross-device link” error

EXFULL error

“Largest errno” error