るりまサーチ

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

別のキーワード

  1. _builtin backtrace_locations
  2. thread backtrace_locations
  3. _builtin backtrace
  4. exception backtrace_locations
  5. exception backtrace

ライブラリ

クラス

キーワード

検索結果

Exception#backtrace_locations -> [Thread::Backtrace::Location] (39153.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
require...
...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#backtr...

Exception#backtrace -> [String] (21012.0)

バックトレース情報を返します。

...)
* "#{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...

Ruby用語集 (30.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...また、例外オブジェクトは例外が発生した時点までのスタックトレースを保持しており、
Exception
#backtrace や Exception#backtrace_locations
取り出すことができる。

: スーパークラス
: superclass
クラス B がクラス A のサブク...
...: るりま
: rurema
Ruby の公式日本語リファレンスマニュアルである Ruby Reference
Manual の愛称。

: 例外
: exception
Exception
クラス(やその子孫クラス)のインスタンス。

: レキシカルスコープ
: lexical scope
ソースコード上の...

NEWS for Ruby 3.0.0 (12.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...non-blocking execution contexts. 16786
* Fiber#blocking? tells whether the fiber is non-blocking. 16786
* Fiber#backtrace and Fiber#backtrace_locations provide per-fiber backtrace. 16815
* The limitation of Fiber#transfer is relaxed. 17221
* GC
* GC.auto_compact= and GC.auto_compa...
...y2_keywords` will no longer keep empty keyword splats, those are now removed just as they are for methods not using `ruby2_keywords`.
* When an exception is caught in the default handler, the error message and backtrace are printed in order from the innermost. 8661
* Accessing an uninitialized i...