821件ヒット
[1-100件を表示]
(0.143秒)
ライブラリ
- ビルトイン (495)
- bigdecimal (40)
- fileutils (24)
-
json
/ add / exception (24) -
net
/ http (24) - rexml (12)
- timeout (37)
クラス
- BigDecimal (26)
-
Encoding
:: Converter (12) - Exception (176)
- Fiber (18)
- SignalException (60)
- Thread (66)
- TracePoint (24)
モジュール
- FileUtils (24)
- Kernel (169)
-
Net
:: HTTPExceptions (12) - Timeout (21)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - == (12)
- BigDecimal (14)
- Complex (14)
- Float (7)
- HTTPServerException (12)
- Integer (7)
-
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) - ParseException (12)
- Rational (7)
- Thread (12)
- TracePoint (12)
- abort (24)
-
abort
_ on _ exception (24) -
abort
_ on _ exception= (24) - backtrace (12)
-
backtrace
_ locations (12) - cause (12)
- fail (12)
- inspect (12)
-
json
/ add / exception (12) -
json
_ create (12) -
last
_ error (12) - logger (12)
- mode (24)
-
net
/ http (12) - new (62)
- raise (30)
-
raised
_ exception (12) - remove (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) - response (12)
- rm (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
rubygems
/ exceptions (12) -
set
_ backtrace (12) - signm (12)
- signo (12)
- spawn (28)
- system (28)
- thread (2)
- timeout (37)
-
to
_ json (12) -
to
_ s (12) - yaml (12)
- スレッド (12)
- 制御構造 (12)
検索結果
先頭5件
-
Exception
. exception(error _ message = nil) -> Exception (36451.0) -
例外オブジェクトを生成して返します。
...属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。
//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}
//emlist[例][ruby]{
e = Exception.exception("some mes......sage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}... -
Exception
# exception(error _ message) -> Exception (36437.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin......# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
Exception
# exception -> self (36237.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin......# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
thread (26012.0)
-
スレッド間キューや状態変数 (condition variable) を提供するライブラリです。
...間キューや状態変数 (condition variable) を提供するライブラリです。
このライブラリは Thread を拡張します。rubyインタプリタを
デバッグオプション付き($DEBUGを真)で実行したときには、
Thread.abort_on_exception を true にします。... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (18252.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......Date.new(2000, 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... -
Exception
. new(error _ message = nil) -> Exception (18251.0) -
例外オブジェクトを生成して返します。
...属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。
//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}
//emlist[例][ruby]{
e = Exception.exception("some mes......sage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}... -
rubygems
/ exceptions (18000.0) -
RubyGems で使用する例外クラスを定義したライブラリです。
...RubyGems で使用する例外クラスを定義したライブラリです。... -
Exception
. json _ create(hash) -> Exception (15217.0) -
JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
...JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
@param hash 適切なキーを持つハッシュを指定します。... -
Exception
# backtrace -> [String] (15212.0) -
バックトレース情報を返します。
...line}:in `#{method}'"
(メソッド内の場合)
* "#{sourcefile}:#{sourceline}"
(トップレベルの場合)
という形式の String の配列です。
//emlist[例][ruby]{
def methd
raise
end
begin
methd
rescue => e
p e.backtrace
end
#=> ["filename.rb:2:in `methd'", "filenam......e.rb:6"]
//}
@see Exception#backtrace_locations... -
Exception
# inspect -> String (15118.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}...