662件ヒット
[1-100件を表示]
(0.160秒)
ライブラリ
- English (11)
- ビルトイン (268)
-
minitest
/ unit (1) - optparse (22)
- rake (11)
-
rubygems
/ config _ file (22) -
webrick
/ httpresponse (11)
クラス
- Exception (44)
- Fiber (15)
-
Gem
:: ConfigFile (22) -
OptionParser
:: ParseError (22) -
Rake
:: Application (11) - Thread (33)
-
Thread
:: Backtrace :: Location (77) -
WEBrick
:: HTTPResponse (11)
キーワード
-
$ @ (11) -
$ ERROR _ INFO (11) - == (11)
-
DEFAULT
_ BACKTRACE (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Rubyの起動 (3)
- Ruby用語集 (11)
-
absolute
_ path (11) -
backtrace
_ locations (33) -
base
_ label (11) -
caller
_ locations (22) - fail (33)
-
filter
_ backtrace (12) - inspect (11)
- label (11)
- lineno (11)
- path (11)
- raise (48)
- rubygems (11)
-
rubygems
/ commands / build _ command (11) -
rubygems
/ commands / cert _ command (11) -
rubygems
/ commands / check _ command (11) -
rubygems
/ commands / cleanup _ command (11) -
rubygems
/ commands / contents _ command (11) -
rubygems
/ commands / dependency _ command (11) -
rubygems
/ commands / environment _ command (11) -
rubygems
/ commands / fetch _ command (11) -
rubygems
/ commands / generate _ index _ command (11) -
rubygems
/ commands / help _ command (11) -
rubygems
/ commands / install _ command (11) -
rubygems
/ commands / list _ command (11) -
rubygems
/ commands / lock _ command (11) -
rubygems
/ commands / mirror _ command (11) -
rubygems
/ commands / outdated _ command (11) -
rubygems
/ commands / pristine _ command (11) -
rubygems
/ commands / query _ command (11) -
rubygems
/ commands / rdoc _ command (11) -
rubygems
/ commands / search _ command (11) -
rubygems
/ commands / server _ command (11) -
rubygems
/ commands / sources _ command (11) -
rubygems
/ commands / specification _ command (11) -
rubygems
/ commands / uninstall _ command (11) -
rubygems
/ commands / unpack _ command (11) -
set
_ backtrace (22) -
set
_ error (11) -
to
_ s (11)
検索結果
先頭5件
-
Exception
# backtrace -> [String] (24313.0) -
バックトレース情報を返します。
...{sourcefile}:#{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... -
Thread
# backtrace -> [String] | nil (24313.0) -
スレッドの現在のバックトレースを返します。
...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_binding'"
# ]
th.kill
th.backtrace... -
Gem
:: ConfigFile # backtrace -> bool (24301.0) -
エラー発生時にバックトレースを出力するかどうかを返します。
エラー発生時にバックトレースを出力するかどうかを返します。
真の場合はバックトレースを出力します。そうでない場合はバックトレースを出力しません。 -
OptionParser
:: ParseError # set _ backtrace(array) -> [String] (15401.0) -
自身に array で指定したバックトレースを設定します。
...自身に array で指定したバックトレースを設定します。
@param array バックトレースを文字列の配列で指定します。
@return array を返します。... -
OptionParser
:: ParseError . filter _ backtrace(array) -> [String] (15301.0) -
array で指定されたバックトレースから optparse ライブラリに関する行を除 外します。
...array で指定されたバックトレースから optparse ライブラリに関する行を除
外します。
デバッグモード($DEBUGが真)の場合は何もしません。
@param array バックトレースを文字列の配列で指定します。
@return array を返します。... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (12632.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...クトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得する......aram range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは 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] (12558.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...eption#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Da......00, 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 `ge......t_exception'", "test.rb:15:in `<main>'"]
//}
@see Exception#backtrace... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (12532.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...クトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得する......aram range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは 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 (12408.0) -
バックトレースからこのライブラリに関する部分を取り除いた結果を返します。
...バックトレースからこのライブラリに関する部分を取り除いた結果を返します。
@param backtrace バックトレースを指定します。... -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (12319.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
//}...