このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 1.8.7 リファレンスマニュアル

singleton method Exception.exception

new(error_message = nil) -> Exception[permalink][rdoc]
exception(error_message = nil) -> Exception

例外オブジェクトを生成して返します。

[PARAM] error_message:
エラーメッセージを表す文字列を指定します。このメッセージは属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。