140件ヒット
[101-140件を表示]
(0.084秒)
別のキーワード
ライブラリ
- ビルトイン (128)
-
json
/ add / exception (12)
キーワード
- == (12)
- backtrace (12)
-
backtrace
_ locations (12) - cause (12)
- exception (24)
- inspect (12)
-
set
_ backtrace (12) -
to
_ json (12) -
to
_ s (12)
検索結果
先頭4件
-
Exception
# inspect -> String (20.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
Exception
# message -> String (20.0) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}... -
Exception
# to _ json(*args) -> String (20.0) -
自身を JSON 形式の文字列に変換して返します。
...o_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::GeneratorMethod... -
Exception
# to _ s -> String (20.0) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}...