るりまサーチ

最速Rubyリファレンスマニュアル検索!
1088件ヒット [1-100件を表示] (0.020秒)
トップページ > クエリ:except[x] > クエリ:exception[x]

別のキーワード

  1. _builtin except
  2. env except
  3. hash except
  4. except _builtin
  5. except

キーワード

検索結果

<< 1 2 3 ... > >>

Exception.exception(error_message = nil) -> Exception (36439.0)

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

...属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。

//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}

//emlist[例][ruby]{
e = Exception.exception("some mes...
...sage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}...

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

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

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

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

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

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

Exception#exception -> self (36231.0)

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

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

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

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

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

DRb::DRbUnknown#exception -> DRb::DRbUnknownError (24201.0)

マーシャリングされたオブジェクトが元のオブジェクトに変換できなかった、 ということを意味する例外オブジェクトを返します。

マーシャリングされたオブジェクトが元のオブジェクトに変換できなかった、
ということを意味する例外オブジェクトを返します。

この例外オブジェクトの DRb::DRbUnknownError#unknown を
呼び出すと、 self が返されます。

Exception2MessageMapper#def_exception(exception_name, message_format, superclass = StandardError) -> Class (18424.0)

exception_name という名前の例外クラスを定義します。

...
exception
_name という名前の例外クラスを定義します。

@param exception_name 定義する例外クラスの名前をシンボルで指定します。

@param message_format メッセージのフォーマット。

@param superclass 定義する例外のスーパークラスを指定...

絞り込み条件を変える

Exception2MessageMapper.def_exception(klass, exception_name, message_format, superklass = StandardError) -> Class (18424.0)

exception_name という名前の例外クラスを定義します。

...
exception
_name という名前の例外クラスを定義します。

@param klass 一階層上となるクラス名を指定します。

@param exception_name 例外クラスの名前をシンボルで指定します。

@param message_format メッセージのフォーマットを指定しま...

Exception.new(error_message = nil) -> Exception (18239.0)

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

...属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。

//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}

//emlist[例][ruby]{
e = Exception.exception("some mes...
...sage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}...

Exception2MessageMapper::ErrNotRegisteredException (18016.0)

登録されていない例外が Exception2MessageMapper#Raise で使用された場合に発生します。

...登録されていない例外が Exception2MessageMapper#Raise で使用された場合に発生します。...

MiniTest::Assertions#exception_details(exception, message) -> String (12408.0)

与えられた例外の詳細を文字列として返します。

...与えられた例外の詳細を文字列として返します。

@param exception 例外を指定します。

@param message メッセージを指定します。...

TracePoint#raised_exception -> Exception (12408.0)

発生した例外を返します。

...eError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。

//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
end
//}...

絞り込み条件を変える

Thread#report_on_exception -> bool (12250.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...d.report_on_exception です。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => tru...
...irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Th...
...read:0x00007fc3f48aefc0@(irb):4 dead>
//}

@see Thread.report_on_exception...
<< 1 2 3 ... > >>