るりまサーチ

最速Rubyリファレンスマニュアル検索!
318件ヒット [1-100件を表示] (0.109秒)
トップページ > クエリ:i[x] > クエリ:h[x] > クエリ:Exception[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. csv to_i

検索結果

<< 1 2 3 ... > >>

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...
<< 1 2 3 ... > >>