別のキーワード
ライブラリ
- ビルトイン (359)
- bigdecimal (16)
-
json
/ add / exception (24) -
net
/ http (24) - rexml (12)
- timeout (29)
クラス
- BigDecimal (2)
-
Encoding
:: Converter (12) - Exception (176)
- Fiber (6)
- Hash (8)
- SignalException (60)
- Thread (66)
- TracePoint (12)
モジュール
- Kernel (57)
-
Net
:: HTTPExceptions (12) - Timeout (21)
オブジェクト
- ENV (8)
キーワード
- == (12)
- BigDecimal (14)
- Complex (14)
- Float (7)
- HTTPServerException (12)
- Integer (7)
-
NEWS for Ruby 3
. 0 . 0 (5) - ParseException (12)
- Rational (7)
-
abort
_ on _ exception (24) -
abort
_ on _ exception= (24) - backtrace (12)
-
backtrace
_ locations (12) - cause (12)
- exception (36)
- inspect (12)
-
json
/ add / exception (12) -
json
_ create (12) -
last
_ error (12) - new (50)
- raise (6)
-
raised
_ exception (12) -
rb
_ thread _ select (1) -
report
_ on _ exception (9) -
report
_ on _ exception= (9) - response (12)
-
rubygems
/ exceptions (12) -
set
_ backtrace (12) - signm (12)
- signo (12)
- slice (8)
- timeout (29)
-
to
_ json (12) -
to
_ s (12)
検索結果
先頭5件
-
rubygems
/ exceptions (32000.0) -
RubyGems で使用する例外クラスを定義したライブラリです。
...RubyGems で使用する例外クラスを定義したライブラリです。... -
ENV
. except(*keys) -> Hash (18119.0) -
引数で指定された以外のキーとその値だけを含む Hash を返します。
...引数で指定された以外のキーとその値だけを含む Hash を返します。
//emlist[][ruby]{
ENV #=> {"LANG"=>"en_US.UTF-8", "TERM"=>"xterm-256color", "HOME"=>"/Users/rhc"}
ENV.except("TERM","HOME") #=> {"LANG"=>"en_US.UTF-8"}
//}
@see Hash#except, ENV.slice... -
Hash
# except(*keys) -> Hash (18119.0) -
引数で指定された以外のキーとその値だけを含む Hash を返します。
...引数で指定された以外のキーとその値だけを含む Hash を返します。
引数に指定されていて Hash に存在しないキーは無視されます。
//emlist[][ruby]{
h = { a: 100, b: 200, c: 300 }
h.except(:a) # => {:b=>200, :c=>300}
//}
@see Hash#slice, ENV.except... -
Exception
. exception(error _ message = nil) -> Exception (9212.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 me......ssage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}... -
Exception
# exception(error _ message) -> Exception (9206.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 (9106.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
//}... -
TracePoint
# raised _ exception -> Exception (6206.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
//}... -
Exception
. new(error _ message = nil) -> Exception (6112.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 me......ssage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}... -
Thread
# abort _ on _ exception -> bool (6106.0) -
真の場合、そのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例 外は、Thread#join などで検出されない限りそのスレッ ドだけをなにも警告を出さずに終了させます。
...。c:Thread#exceptionを参照してください。
@param newstate 自身を実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.abort_on_exception # => fal......se
thread.abort_on_exception = true
thread.abort_on_exception # => true
//}... -
Thread
# abort _ on _ exception=(newstate) (6106.0) -
真の場合、そのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例 外は、Thread#join などで検出されない限りそのスレッ ドだけをなにも警告を出さずに終了させます。
...。c:Thread#exceptionを参照してください。
@param newstate 自身を実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.abort_on_exception # => fal......se
thread.abort_on_exception = true
thread.abort_on_exception # => true
//}...