318件ヒット
[1-100件を表示]
(0.109秒)
ライブラリ
- ビルトイン (116)
-
json
/ add / exception (11) - matrix (11)
-
minitest
/ unit (2) -
net
/ http (39) - psych (11)
-
rubygems
/ exceptions (11) -
rubygems
/ security (22) -
rubygems
/ spec _ fetcher (11) -
webrick
/ httpauth / authenticator (22)
クラス
- Exception (40)
-
Gem
:: Security :: Policy (11) -
Gem
:: SpecFetcher (11) -
MiniTest
:: Unit (1) -
MiniTest
:: Unit :: TestCase (1) - Thread (87)
モジュール
キーワード
- == (11)
- AuthException (22)
- ErrDimensionMismatch (11)
- GemNotInHomeException (11)
- HTTPClientException (6)
- HTTPExceptions (11)
- HTTPServerException (11)
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
PASSTHROUGH
_ EXCEPTIONS (1) - Rubyの起動 (3)
-
abort
_ on _ exception (22) -
abort
_ on _ exception= (22) -
backtrace
_ locations (11) - debug (11)
-
handle
_ interrupt (11) -
json
_ create (11) - logger (11)
- puke (1)
-
report
_ on _ exception (16) -
report
_ on _ exception= (16) - response (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
verify
_ gem (11) -
verify
_ trust _ dir (11) -
warn
_ legacy (11)
検索結果
先頭5件
-
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (30346.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......0, month, -1).day == 31
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... -
Psych
:: Exception (27000.0) -
Psych 関連のエラーを表す例外です。
...Psych 関連のエラーを表す例外です。... -
Exception
# full _ message(highlight: true , order: :bottom) -> String (24318.0) -
例外の整形された文字列を返します。
...して実際に、キーワード引数 highlight と order は 2.5.1 で追加されました。
@param highlight エスケープシーケンスによる文字装飾をつけるかどうかを指定します。
デフォルト値は Exception.to_tty? の返り値と同じです。......デフォルト値は Exception.to_tty? が真なら :bottom で偽なら :top です。
//emlist[例][ruby]{
begin
raise "test"
rescue => e
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$s......tderr = $stdout
p e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = STDERR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}
@see Exception.to_tty?......プシーケンスによる文字装飾がついています。
@param highlight エスケープシーケンスによる文字装飾をつけるかどうかを指定します。
デフォルト値は Exception.to_tty? の返り値と同じです。
@param order :top か :bottom... -
Exception
. json _ create(hash) -> Exception (24301.0) -
JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
...JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
@param hash 適切なキーを持つハッシュを指定します。... -
Exception
# ==(other) -> bool (24124.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
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 が同一... -
WEBrick
:: HTTPAuth :: Authenticator :: AuthException -> Class (21300.0) -
認証失敗時に発生する例外のクラスです。
認証失敗時に発生する例外のクラスです。 -
WEBrick
:: HTTPAuth :: ProxyAuthenticator :: AuthException -> Class (21300.0) -
WEBrick::HTTPStatus::ProxyAuthenticationRequired です。
...WEBrick::HTTPStatus::ProxyAuthenticationRequired です。... -
MiniTest
:: Unit :: TestCase :: PASSTHROUGH _ EXCEPTIONS -> [Class] (18300.0) -
システム関連の例外のリストです。内部で使用します。
システム関連の例外のリストです。内部で使用します。 -
ExceptionForMatrix
:: ErrDimensionMismatch (18000.0) -
行列/ベクトル計算時に次元が合わない場合に発生する例外です。
行列/ベクトル計算時に次元が合わない場合に発生する例外です。 -
Gem
:: GemNotInHomeException (18000.0) -
Gem が適切なディレクトリにインストールされていない場合に使用する例外です。
Gem が適切なディレクトリにインストールされていない場合に使用する例外です。 -
Net
:: HTTPClientException (18000.0) -
Alias of Net::HTTPServerException
...Alias of Net::HTTPServerException...