Exception: RuntimeError

Inherits:
StandardError show all
Defined in:
error.c

Overview

A generic error class raised when an invalid operation is attempted.

[1, 2, 3].freeze << 4

raises the exception:

RuntimeError: can't modify frozen array

Kernel.raise will raise a RuntimeError if no Exception class is specified.

raise "ouch"

raises the exception:

RuntimeError: ouch

Method Summary

Methods inherited from Exception

#==, #backtrace, #exception, exception, #initialize, #inspect, #message, #set_backtrace, #to_s

Constructor Details

This class inherits a constructor from Exception