ライブラリ
- ビルトイン (245)
- bigdecimal (11)
- drb (11)
- e2mmap (36)
-
json
/ add / exception (11) -
minitest
/ unit (3) -
net
/ http (11) - rexml (44)
-
rubygems
/ commands / lock _ command (11) -
rubygems
/ security (11) -
rubygems
/ spec _ fetcher (11) - stringio (11)
- timeout (11)
クラス
-
ARGF
. class (9) - BigDecimal (11)
-
DRb
:: DRbUnknown (11) -
Encoding
:: Converter (11) - Exception (128)
- Fiber (15)
-
Gem
:: Commands :: LockCommand (11) -
Gem
:: Security :: Policy (11) -
Gem
:: SpecFetcher (11) - IO (22)
-
MiniTest
:: Unit (2) -
REXML
:: ParseException (44) - SignalException (22)
- StringIO (11)
- Thread (38)
- TracePoint (11)
モジュール
- Exception2MessageMapper (36)
- Kernel (11)
-
MiniTest
:: Assertions (1) -
Net
:: HTTPExceptions (11)
キーワード
- == (11)
- Fail (6)
- Raise (6)
-
abort
_ on _ exception (11) -
abort
_ on _ exception= (11) - backtrace (11)
-
backtrace
_ locations (11) - bind (6)
- cause (11)
- complain (11)
- context (11)
-
def
_ exception (6) -
exception
_ details (1) - fail (6)
- inspect (11)
-
last
_ error (11) - line (11)
- location (1)
- position (11)
- puke (1)
- raise (15)
-
raised
_ exception (11) -
read
_ nonblock (31) -
report
_ on _ exception (8) -
report
_ on _ exception= (8) - response (11)
-
save
_ exception _ mode (11) -
set
_ backtrace (11) - signm (11)
- signo (11)
- timeout (11)
-
to
_ json (11) -
to
_ s (22) -
verify
_ gem (11) -
warn
_ legacy (11) -
write
_ nonblock (11)
検索結果
先頭5件
-
Exception
# exception(error _ message) -> Exception (36432.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...引数を指定した場合 自身のコピー
を生成し 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 (36232.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...引数を指定した場合 自身のコピー
を生成し 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 (24202.0) -
マーシャリングされたオブジェクトが元のオブジェクトに変換できなかった、 ということを意味する例外オブジェクトを返します。
マーシャリングされたオブジェクトが元のオブジェクトに変換できなかった、
ということを意味する例外オブジェクトを返します。
この例外オブジェクトの DRb::DRbUnknownError#unknown を
呼び出すと、 self が返されます。 -
Exception2MessageMapper
# def _ exception(exception _ name , message _ format , superclass = StandardError) -> Class (18425.0) -
exception_name という名前の例外クラスを定義します。
...
exception_name という名前の例外クラスを定義します。
@param exception_name 定義する例外クラスの名前をシンボルで指定します。
@param message_format メッセージのフォーマット。
@param superclass 定義する例外のスーパークラスを指定... -
Exception
# inspect -> String (15119.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
MiniTest
:: Assertions # exception _ details(exception , message) -> String (12409.0) -
与えられた例外の詳細を文字列として返します。
...与えられた例外の詳細を文字列として返します。
@param exception 例外を指定します。
@param message メッセージを指定します。... -
TracePoint
# raised _ exception -> Exception (12409.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 (12251.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...hread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # =>......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... -
Thread
# report _ on _ exception=(newstate) (12251.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...hread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # =>......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... -
Thread
# abort _ on _ exception -> bool (12227.0) -
真の場合、そのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例 外は、Thread#join などで検出されない限りそのスレッ ドだけをなにも警告を出さずに終了させます。
...c:Thread#exceptionを参照してください。
@param newstate 自身を実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.abort_on_exception # => false......thread.abort_on_exception = true
thread.abort_on_exception # => true
//}... -
Thread
# abort _ on _ exception=(newstate) (12227.0) -
真の場合、そのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例 外は、Thread#join などで検出されない限りそのスレッ ドだけをなにも警告を出さずに終了させます。
...c:Thread#exceptionを参照してください。
@param newstate 自身を実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.abort_on_exception # => false......thread.abort_on_exception = true
thread.abort_on_exception # => true
//}...