module Errno

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

E2BIG

“Argument list too long” error

EACCES

“Permission denied” error

EADDRINUSE

“Address in use” error

EADDRNOTAVAIL

“Address not available” error

EADV

EADV error

EAFNOSUPPORT

“Address family not supported” error

EAGAIN

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

EALREADY

“Connection already in progress” error

EAUTH

EAUTH error

EBADARCH

EBADARCH error

EBADE

EBADE error

EBADEXEC

EBADEXEC error

EBADF

“Bad file descriptor” error

EBADFD

EBADFD error

EBADMACHO

EBADMACHO error

EBADMSG

“Bad message” error

EBADR

EBADR error

EBADRPC

EBADRPC error

EBADRQC

EBADRQC error

EBADSLT

EBADSLT error

EBFONT

EBFONT error

EBUSY

“Device or resource busy” error

ECANCELED

“Operation canceled” error

ECAPMODE

ECAPMODE error

ECHILD

“No child processes” error

ECHRNG

ECHRNG error

ECOMM

ECOMM error

ECONNABORTED

“Connection aborted” error

ECONNREFUSED

“Connection refused” error

ECONNRESET

“Connection reset” error

EDEADLK

“Resource deadlock would occur” error

EDEADLOCK

EDEADLOCK error

EDESTADDRREQ

“Destination address required” error

EDEVERR

EDEVERR error

EDOM

“Mathematics argument out of domain of function” error

EDOOFUS

EDOOFUS error

EDOTDOT

EDOTDOT error

EDQUOT

“Reserved” error

EEXIST

“File exists” error

EFAULT

“Bad address” error

EFBIG

“File too large” error

EFTYPE

EFTYPE error

EHOSTDOWN

EHOSTDOWN error

EHOSTUNREACH

“Host is unreachable” error

EHWPOISON

EHWPOISON error

EIDRM

“Identifier removed” error

EILSEQ

“Illegal byte sequence” error

EINPROGRESS

“Operation in progress” error

EINTR

“Interrupted function” error

EINVAL

“Invalid argument” error

EIO

“I/O error” error

EIPSEC

EIPSEC error

EISCONN

“Socket is connected” error

EISDIR

“Is a directory” error

EISNAM

EISNAM error

EKEYEXPIRED

EKEYEXPIRED error

EKEYREJECTED

EKEYREJECTED error

EKEYREVOKED

EKEYREVOKED error

EL2HLT

EL2HLT error

EL2NSYNC

EL2NSYNC error

EL3HLT

EL3HLT error

EL3RST

EL3RST error

ELAST

“Largest errno” error

ELIBACC

ELIBACC error

ELIBBAD

ELIBBAD error

ELIBEXEC

ELIBEXEC error

ELIBMAX

ELIBMAX error

ELIBSCN

ELIBSCN error

ELNRNG

ELNRNG error

ELOOP

“Too many levels of symbolic links” error

EMEDIUMTYPE

EMEDIUMTYPE error

EMFILE

“File descriptor value too large” error

“Too many links” error

EMSGSIZE

“Message too large” error

EMULTIHOP

“Reserved” error

ENAMETOOLONG

“Filename too long” error

ENAVAIL

ENAVAIL error

ENEEDAUTH

ENEEDAUTH error

ENETDOWN

“Network is down” error

ENETRESET

“Connection aborted by network” error

ENETUNREACH

“Network unreachable” error

ENFILE

“Too many files open in system” error

ENOANO

ENOANO error

ENOATTR

ENOATTR error

ENOBUFS

“No buffer space available” error

ENOCSI

ENOCSI error

ENODATA

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

ENODEV

“No such device” error

ENOENT

“No such file or directory” error

ENOEXEC

“Executable file format error” error

ENOKEY

ENOKEY error

ENOLCK

“No locks available” error

“Reserved” error

ENOMEDIUM

ENOMEDIUM error

ENOMEM

“Not enough space” error

ENOMSG

“No message of the desired type” error

ENONET

ENONET error

ENOPKG

ENOPKG error

ENOPOLICY

ENOPOLICY error

ENOPROTOOPT

“Protocol not available” error

ENOSPC

“No space left on device” error

ENOSR

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

ENOSTR

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

ENOSYS

“Functionality not supported” error

ENOTBLK

ENOTBLK error

ENOTCAPABLE

ENOTCAPABLE error

ENOTCONN

“The socket is not connected” error

ENOTDIR

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

ENOTEMPTY

“Directory not empty” error

ENOTNAM

ENOTNAM error

ENOTRECOVERABLE

“State not recoverable” error

ENOTSOCK

“Not a socket” error

ENOTSUP

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

ENOTTY

“Inappropriate I/O control operation” error

ENOTUNIQ

ENOTUNIQ error

ENXIO

“No such device or address” error

EOPNOTSUPP

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

EOVERFLOW

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

EOWNERDEAD

“Previous owner died” error

EPERM

“Operation not permitted” error

EPFNOSUPPORT

EPFNOSUPPORT error

EPIPE

“Broken pipe” error

EPROCLIM

EPROCLIM error

EPROCUNAVAIL

EPROCUNAVAIL error

EPROGMISMATCH

EPROGMISMATCH error

EPROGUNAVAIL

EPROGUNAVAIL error

EPROTO

“Protocol error” error

EPROTONOSUPPORT

“Protocol not supported” error

EPROTOTYPE

“Protocol wrong type for socket” error

EPWROFF

EPWROFF error

EQFULL

EQFULL error

ERANGE

“Result too large” error

EREMCHG

EREMCHG error

EREMOTE

EREMOTE error

EREMOTEIO

EREMOTEIO error

ERESTART

ERESTART error

ERFKILL

ERFKILL error

EROFS

“Read-only file system” error

ERPCMISMATCH

ERPCMISMATCH error

ESHLIBVERS

ESHLIBVERS error

ESHUTDOWN

ESHUTDOWN error

ESOCKTNOSUPPORT

ESOCKTNOSUPPORT error

ESPIPE

“Invalid seek” error

ESRCH

“No such process” error

ESRMNT

ESRMNT error

ESTALE

“Reserved” error

ESTRPIPE

ESTRPIPE error

ETIME

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

ETIMEDOUT

“Connection timed out” error

ETOOMANYREFS

ETOOMANYREFS error

ETXTBSY

“Text file busy” error

EUCLEAN

EUCLEAN error

EUNATCH

EUNATCH error

EUSERS

EUSERS error

EWOULDBLOCK

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

EXDEV

“Cross-device link” error

EXFULL

EXFULL error

NOERROR

No error