164件ヒット
[101-164件を表示]
(0.107秒)
別のキーワード
ライブラリ
- ビルトイン (140)
-
json
/ add / exception (12) -
net
/ http (12)
クラス
- Exception (116)
- SignalException (24)
- TracePoint (12)
モジュール
-
Net
:: HTTPExceptions (12)
キーワード
- == (12)
- backtrace (12)
-
backtrace
_ locations (12) - inspect (12)
-
raised
_ exception (12) - response (12)
-
set
_ backtrace (12) - signm (12)
- signo (12)
-
to
_ json (12) -
to
_ s (12)
検索結果
先頭5件
-
Exception
# inspect -> String (9131.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
Exception
# message -> String (9119.0) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}... -
Exception
# to _ json(*args) -> String (9119.0) -
自身を JSON 形式の文字列に変換して返します。
...erator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。
//emlist[例][ruby]{
require "json/add/core"
begin
0/0
rescue => e
e.to_json # => "{\"json_class\":\"ZeroDivisionError\......",\"m\":\"divided by 0\",\"b\":[\"/path/to/test.rb:4:in `/'\",\"/path/to/test.rb:4:in `<main>'\"]}"
end
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
Exception
# to _ s -> String (9119.0) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}... -
SignalException
# signm -> String (3119.0) -
self.message のエイリアスです。
...self.message のエイリアスです。
//emlist[例][ruby]{
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
puts e.signm # => SIGHUP
end
//}... -
SignalException
# signo -> Integer (3119.0) -
self のシグナル番号を返します。
...self のシグナル番号を返します。
//emlist[例][ruby]{
p Signal.signame(1) # => "HUP"
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
p e.signo # => 1
end
//}...