るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.138秒)

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils cp_r
  5. fileutils chmod_r

ライブラリ

検索結果

Exception#exception(error_message) -> Exception (27350.0)

引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。

...い場合は self を返します。引数を指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。

Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。

@param error_message エ...
...ラーメッセージを表す文字列を指定します。

//emlist[例][ruby]{
begin
# ... # 何か処理
r
escue => e
r
aise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}...

Exception#inspect -> String (9130.0)

self のクラス名と message を文字列にして返します。

...
self
のクラス名と message を文字列にして返します。

//emlist[例][ruby]{
begin
r
aise "exception"
r
escue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}...