Built-in Exception Classes
Exception
The superclass of all exceptions.
NoMemoryError
Thrown when attempting to reserve too much memory at once.
ScriptError
Indicates a script error.
NotImplementedError
Thrown when an unimplemented feature is invoked.
SyntaxError
Thrown by a syntax error.
StandardError
Without a class specified, the
rescue class
will catch the subclasses of this exception class.
ArgumentError
Thrown when argument numbers do not match or when the values are incorrect.
IndexError
Thrown when the index is out of range.
IOError
Thrown when an I/O error occurs.
EOFError
Thrown when EOF (End Of File) has been reached.
LocalJumpError
Thrown when no jump destination is found for a control structure.
NameError
Thrown when accessing an undefined local variable or constant.
NoMethodError
Thrown when calling an undefined method.
RangeError
A range exception. Thrown when an out-of-range integer conversion (from
Bignum
to
Fixnum
) , etc., occurs.
FloatDomainError
Thrown when trying to convert a positive or negative infinite number or NaN (Not a Number) into
Bignum
, or when comparing a number to a NaN.
RegexpError
Thrown when compiling a regular expression fails.
RuntimeError
A runtime exception. Thrown when calling
raise
without specifying an exception.
SystemCallError
Thrown when a system call fails.
Errno::EXXX
Exception class for each errno. See the
Errno
module for more on each class name.
SystemStackError
Thrown when a stack level becomes too deep.
TypeError
Thrown when an illegal type is invoked.
ZeroDivisionError
Thrown when dividing by zero.
SystemExit
Terminates the program. See
exit
for more information.
fatal
A fatal (internal) error. This object is not visible with normal methods.
Converted from CHM to HTML with
chm2web Pro 2.85 (unicode)