433件ヒット
[201-300件を表示]
(0.108秒)
ライブラリ
- ビルトイン (266)
- bigdecimal (12)
- drb (12)
- e2mmap (36)
-
json
/ add / exception (12) -
minitest
/ unit (3) -
net
/ http (12) - rexml (48)
-
rubygems
/ spec _ fetcher (12) - stringio (12)
- timeout (8)
クラス
-
ARGF
. class (10) - BigDecimal (12)
-
DRb
:: DRbUnknown (12) -
Encoding
:: Converter (12) - Exception (140)
- Fiber (6)
-
Gem
:: SpecFetcher (12) - Hash (8)
- IO (24)
-
MiniTest
:: Unit (2) -
REXML
:: ParseException (48) - SignalException (24)
- StringIO (12)
- Thread (42)
- TracePoint (12)
モジュール
- Exception2MessageMapper (36)
- Kernel (8)
-
MiniTest
:: Assertions (1) -
Net
:: HTTPExceptions (12)
キーワード
- == (12)
- Fail (6)
- Raise (6)
-
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) - backtrace (12)
-
backtrace
_ locations (12) - bind (6)
- cause (12)
- context (12)
-
def
_ exception (6) - exception (36)
-
exception
_ details (1) - fail (6)
- inspect (12)
-
last
_ error (12) - line (12)
- location (1)
- position (12)
- puke (1)
- raise (6)
-
raised
_ exception (12) -
read
_ nonblock (34) -
report
_ on _ exception (9) -
report
_ on _ exception= (9) - response (12)
-
save
_ exception _ mode (12) -
set
_ backtrace (12) - signm (12)
- signo (12)
- slice (4)
- timeout (8)
-
to
_ json (12) -
to
_ s (24) -
warn
_ legacy (12) -
write
_ nonblock (12)
検索結果
先頭5件
-
Exception
# inspect -> String (3001.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
Exception
# message -> String (3001.0) -
エラーメッセージをあらわす文字列を返します。
エラーメッセージをあらわす文字列を返します。
//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//} -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (3001.0) -
バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。
バックトレース情報に errinfo を設定し、設定されたバックトレース
情報を返します。
@param errinfo nil、String あるいは String の配列のいずれかを指定します。
//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
$!.backtrace # => ["/path/to/test.rb:5:in `rescue in <main>'", "/path/to/test.rb:2:in `<main>'"]
$!.se... -
Exception
# to _ json(*args) -> String (3001.0) -
自身を JSON 形式の文字列に変換して返します。
自身を JSON 形式の文字列に変換して返します。
内部的にはハッシュにデータをセットしてから JSON::Generator::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\":\"ZeroDivis... -
Exception
# to _ s -> String (3001.0) -
エラーメッセージをあらわす文字列を返します。
エラーメッセージをあらわす文字列を返します。
//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//} -
Exception2MessageMapper
# bind(cl) -> () (3001.0) -
@todo
@todo
@param cl xxx -
Net
:: HTTPExceptions # response -> Net :: HTTPResponse (3001.0) -
例外の原因となったレスポンスオブジェクトを返します。
例外の原因となったレスポンスオブジェクトを返します。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/invalid.html"
response = Net::HTTP.get_response(URI.parse(uri))
begin
response.value
rescue => e
e.response # => #<Net::HTTPNotFound 404 Not Found readbody=true>
end
//} -
REXML
:: ParseException # context -> [Integer , Integer , Integer] (3001.0) -
パースエラーが起きた(XML上の)場所を返します。
...を返します。
要素3個の配列で、
[position, lineno, line]
という形で返します。
position, line は
REXML::ParseException#position
REXML::ParseException#line
と同じ値です。
lineno は IO#lineno が返す意味での行数です。
通常は line と同じ値です。... -
REXML
:: ParseException # line -> Integer (3001.0) -
パースエラーが起きた(XML上の)場所を行数で返します。
パースエラーが起きた(XML上の)場所を行数で返します。 -
REXML
:: ParseException # position -> Integer (3001.0) -
パースエラーが起きた(XML上の)場所を先頭からのバイト数で返します。
パースエラーが起きた(XML上の)場所を先頭からのバイト数で返します。