70件ヒット
[1-70件を表示]
(0.015秒)
トップページ > :backtrace_locations
別のキーワード
種類
- インスタンスメソッド (44)
- 文書 (26)
ライブラリ
- ビルトイン (44)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
- backtrace (11)
検索結果
先頭5件
-
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (18108.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace::Location... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (18108.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace::Location... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (18107.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...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>'"]
//}... -
NEWS for Ruby 2
. 0 . 0 (12.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ling of exceptions
* 追加: Thread#backtrace_locations Kernel#caller_locations に似た情報を返します
* 新規クラス: Thread::Backtrace::Location to hold backtrace location
information. These are returned by Thread#backtrace_locations and
Kernel#caller_locations
*... -
Exception
# backtrace -> [String] (6.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... -
NEWS for Ruby 3
. 0 . 0 (6.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... -
Ruby用語集 (6.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 のサブクラスであるとき...