Ruby 1.9.3 Reference Manual > All Libraries > Builtin Library > class Exception > exception

singleton method Exception.exception

new(error_message = nil)
exception(error_message = nil)

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

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