517件ヒット
[1-100件を表示]
(0.142秒)
ライブラリ
- ビルトイン (224)
-
minitest
/ unit (2) - optparse (22)
- rake (11)
-
rubygems
/ config _ file (33) -
webrick
/ httpresponse (11)
クラス
- Exception (44)
- Fiber (15)
-
Gem
:: ConfigFile (33) -
OptionParser
:: ParseError (22) - Thread (33)
-
Thread
:: Backtrace :: Location (77) -
WEBrick
:: HTTPResponse (11)
モジュール
- Kernel (44)
- MiniTest (1)
-
MiniTest
:: Assertions (1) - Rake (11)
キーワード
- == (11)
-
DEFAULT
_ BACKTRACE (11) - Location (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 3
. 0 . 0 (4) - Rubyの起動 (3)
- Ruby用語集 (11)
-
absolute
_ path (11) - application= (11)
- backtrace= (11)
-
backtrace
_ locations (33) -
base
_ label (11) -
caller
_ locations (22) - fail (11)
-
filter
_ backtrace (12) -
get
_ backtrace (11) - inspect (11)
- label (11)
- lineno (11)
-
make
_ backtrace (11) - path (11)
- raise (26)
-
rb
_ backtrace (11) -
rubygems
/ commands / build _ command (11) -
rubygems
/ commands / environment _ command (11) -
rubygems
/ commands / generate _ index _ command (11) -
rubygems
/ commands / install _ command (11) -
rubygems
/ commands / list _ command (11) -
rubygems
/ commands / mirror _ command (11) -
rubygems
/ commands / pristine _ command (11) -
rubygems
/ commands / query _ command (11) -
rubygems
/ commands / search _ command (11) -
rubygems
/ commands / specification _ command (11) -
rubygems
/ commands / uninstall _ command (11) -
set
_ backtrace (33) -
set
_ error (11) - skip (1)
-
to
_ s (11)
検索結果
先頭5件
-
static VALUE backtrace(int lev) (44300.0)
-
-
Exception
# backtrace -> [String] (27313.0) -
バックトレース情報を返します。
...rcefile}:#{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... -
Gem
:: ConfigFile # backtrace -> bool (27201.0) -
エラー発生時にバックトレースを出力するかどうかを返します。
エラー発生時にバックトレースを出力するかどうかを返します。
真の場合はバックトレースを出力します。そうでない場合はバックトレースを出力しません。 -
Thread
# backtrace -> [String] | nil (24313.0) -
スレッドの現在のバックトレースを返します。
...il を返します。
//emlist[例][ruby]{
class C1
def m1
sleep 5
end
def m2
m1
end
end
th = Thread.new {C1.new.m2; Thread.stop}
th.backtrace
# => [
# [0] "(irb):3:in `sleep'",
# [1] "(irb):3:in `m1'",
# [2] "(irb):6:in `m2'",
# [3] "(irb):10:in `block in irb_b......inding'"
# ]
th.kill
th.backtrace # => nil
//}... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (21652.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...ception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if D......aise "#{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:i......n `<main>'"]
//}
@see Exception#backtrace... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (18632.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します......cations と似ていますが、本メソッドは 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 (18632.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します......cations と似ていますが、本メソッドは 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... -
MiniTest
. filter _ backtrace(backtrace) -> Array (18508.0) -
バックトレースからこのライブラリに関する部分を取り除いた結果を返します。
...バックトレースからこのライブラリに関する部分を取り除いた結果を返します。
@param backtrace バックトレースを指定します。... -
OptionParser
:: ParseError . filter _ backtrace(array) -> [String] (18301.0) -
array で指定されたバックトレースから optparse ライブラリに関する行を除 外します。
...array で指定されたバックトレースから optparse ライブラリに関する行を除
外します。
デバッグモード($DEBUGが真)の場合は何もしません。
@param array バックトレースを文字列の配列で指定します。
@return array を返します。... -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (15519.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
//}...