1420件ヒット
[1-100件を表示]
(0.121秒)
種類
ライブラリ
- English (12)
- ビルトイン (607)
- bigdecimal (112)
- drb (24)
- e2mmap (96)
- fileutils (24)
- irb (12)
- json (12)
-
json
/ add / exception (24) - matrix (36)
-
minitest
/ unit (4) -
net
/ ftp (12) -
net
/ http (24) - rexml (72)
-
rubygems
/ exceptions (36) -
rubygems
/ gem _ openssl (12) -
rubygems
/ security (36) -
rubygems
/ spec _ fetcher (12) - stringio (12)
- timeout (16)
-
webrick
/ httpauth / authenticator (24)
クラス
-
ARGF
. class (10) - BigDecimal (98)
-
DRb
:: DRbUnknown (12) -
Encoding
:: Converter (12) - Exception (152)
- Fiber (18)
-
Gem
:: Security :: Policy (12) -
Gem
:: SpecFetcher (12) - IO (24)
-
JSON
:: State (12) -
MiniTest
:: Unit (2) -
MiniTest
:: Unit :: TestCase (1) -
REXML
:: ParseException (48) - SignalException (48)
- StringIO (12)
- Thread (96)
- TracePoint (24)
モジュール
- Exception2MessageMapper (78)
- FileUtils (24)
- Gem (12)
-
Gem
:: Security (12) - IRB (12)
- Kernel (265)
-
MiniTest
:: Assertions (1) -
Net
:: HTTPExceptions (12) -
WEBrick
:: HTTPAuth :: Authenticator (12) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (12)
キーワード
-
$ ! (12) -
$ -d (12) -
$ DEBUG (12) -
$ ERROR _ INFO (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - == (12)
- AuthException (24)
- BigDecimal (14)
- Complex (14)
- DRbUnknownError (12)
- DependencyRemovalException (12)
- E2MM (6)
-
EXCEPTION
_ ALL (12) -
EXCEPTION
_ INFINITY (12) -
EXCEPTION
_ NaN (12) -
EXCEPTION
_ OVERFLOW (12) -
EXCEPTION
_ UNDERFLOW (12) -
EXCEPTION
_ ZERODIVIDE (12) - ErrDimensionMismatch (12)
- ErrNotRegisteredException (6)
- ErrNotRegular (12)
- ErrOperationNotDefined (12)
- Exception2MessageMapper (6)
- FTPError (12)
- Fail (12)
- Float (7)
- FormatException (12)
- HTTPServerException (12)
- Integer (7)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (5) -
PASSTHROUGH
_ EXCEPTIONS (1) - ParseException (12)
- Raise (12)
- Rational (7)
- RemoteSourceException (12)
- Rubyの起動 (4)
- Ruby用語集 (12)
- Thread (12)
- TracePoint (12)
- UndefinedNamespaceException (12)
- abort (24)
-
abort
_ on _ exception (24) -
abort
_ on _ exception= (24) - backtrace (12)
-
backtrace
_ locations (12) - bind (6)
- context (12)
- debug (12)
-
def
_ exception (12) -
ensure
_ ssl _ available (12) - exception (36)
-
exception
_ details (1) -
extend
_ object (6) - fail (42)
- generate (12)
-
handle
_ interrupt (12) - inspect (12)
-
irb
_ abort (12) -
json
_ create (12) -
last
_ error (12) - line (12)
- location (1)
- logger (12)
- mode (24)
- new (50)
- position (12)
- puke (1)
- raise (54)
-
raised
_ exception (12) -
read
_ nonblock (34) - remove (12)
-
report
_ on _ exception (18) -
report
_ on _ exception= (18) - response (12)
- rm (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
rubygems
/ exceptions (12) -
set
_ backtrace (12) - signm (12)
- signo (12)
- spawn (28)
- system (28)
- thread (2)
- timeout (16)
-
to
_ json (12) -
to
_ s (24) -
verify
_ gem (12) -
verify
_ trust _ dir (12) -
warn
_ legacy (12) -
write
_ nonblock (12) - yaml (12)
- スレッド (12)
- 制御構造 (12)
検索結果
先頭5件
-
rubygems
/ exceptions (32000.0) -
RubyGems で使用する例外クラスを定義したライブラリです。
...RubyGems で使用する例外クラスを定義したライブラリです。... -
Exception
. exception(error _ message = nil) -> Exception (27339.0) -
例外オブジェクトを生成して返します。
...します。
@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。
//emlist[例][ruby]{
e = Exception.new("some messag......e")
p e # => #<Exception: some message>
p e.message # => "some message"
//}
//emlist[例][ruby]{
e = Exception.exception("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}... -
Exception
# exception(error _ message) -> Exception (27331.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...生成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begi......n
# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (27246.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if......1
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "test.rb......:15:in `<main>'"]
//}
@see Exception#backtrace... -
Exception
. json _ create(hash) -> Exception (27201.0) -
JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
...JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
@param hash 適切なキーを持つハッシュを指定します。... -
Exception
# backtrace -> [String] (27106.0) -
バックトレース情報を返します。
...{sourcefile}:#{sourceline}:in `#{method}'"
(メソッド内の場合)
* "#{sourcefile}:#{sourceline}"
(トップレベルの場合)
という形式の String の配列です。
//emlist[例][ruby]{
def methd
raise
end
begin
methd
rescue => e
p e.backtrace
end
#=> ["filename.rb:2:......in `methd'", "filename.rb:6"]
//}
@see Exception#backtrace_locations... -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (27100.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>'"]
$!.set_backtrace(["dummy1", "dummy2"])
$!.backtrace # => ["dummy1", "dummy2"]
end
//}... -
Exception
. new(error _ message = nil) -> Exception (24239.0) -
例外オブジェクトを生成して返します。
...します。
@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。
//emlist[例][ruby]{
e = Exception.new("some messag......e")
p e # => #<Exception: some message>
p e.message # => "some message"
//}
//emlist[例][ruby]{
e = Exception.exception("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}... -
Exception
# ==(other) -> bool (21124.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。......た場合は
Exception#exception を実行して変換を試みます。
//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e......end
end
results = [2, 2, 4].map { |e | get_exception { check_long_month(e) } }
p results.map { |e| e.class }
# => [RuntimeError, RuntimeError, RuntimeError]
p results.map { |e| e.message }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]
# class, message, backtrace が...