種類
- インスタンスメソッド (15)
- 特異メソッド (6)
ライブラリ
- ビルトイン (21)
検索結果
先頭5件
-
Exception
# message -> String (18108) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end... -
Exception
# to _ s -> String (3008) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end... -
Exception
# to _ str -> String (3008) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end... -
Exception
# exception(error _ message) -> Exception (140) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指......定します。
begin
... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end... -
Exception
. exception(error _ message = nil) (115) -
例外オブジェクトを生成して返します。
...例外オブジェクトを生成して返します。
@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。... -
Exception
. new(error _ message = nil) (115) -
例外オブジェクトを生成して返します。
...例外オブジェクトを生成して返します。
@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。... -
Exception
# exception -> self (40) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指......定します。
begin
... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end... -
Exception
# ==(other) -> bool (17) -
自身と指定された other のクラスが同じであり、message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...自身と指定された other のクラスが同じであり、message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。...
