別のキーワード
ライブラリ
- ビルトイン (250)
- e2mmap (96)
-
minitest
/ unit (1) -
net
/ ftp (12) -
rubygems
/ commands / lock _ command (12) - timeout (18)
クラス
- Exception (112)
- Fiber (18)
-
Gem
:: Commands :: LockCommand (12) - SignalException (12)
モジュール
- Exception2MessageMapper (78)
- Kernel (96)
-
MiniTest
:: Assertions (1) - Timeout (18)
キーワード
- == (12)
- E2MM (6)
- ErrNotRegisteredException (6)
- Exception2MessageMapper (6)
- FTPError (12)
- Fail (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (5) - Raise (12)
- SignalException (12)
- abort (24)
- bind (6)
- complain (12)
-
def
_ exception (12) - e2mmap (6)
-
exception
_ details (1) -
extend
_ object (6) - fail (42)
- inspect (12)
- logger (12)
- new (12)
- raise (54)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) - signm (12)
- timeout (18)
-
to
_ s (12) -
to
_ tty? (8) - 制御構造 (12)
検索結果
先頭5件
-
Exception2MessageMapper
. e2mm _ message(klass , exp) -> String | nil (12102.0) -
@todo
@todo
@param klass
@param exp -
Exception2MessageMapper
:: ErrNotRegisteredException (12016.0) -
登録されていない例外が Exception2MessageMapper#Raise で使用された場合に発生します。
...登録されていない例外が Exception2MessageMapper#Raise で使用された場合に発生します。... -
Exception
# to _ s -> String (12007.0) -
エラーメッセージをあらわす文字列を返します。
...エラーメッセージをあらわす文字列を返します。
//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}... -
Exception2MessageMapper (12000.0)
-
例外クラスに特定のエラーメッセージ用フォーマットを関連づけるためのモジュールです。
例外クラスに特定のエラーメッセージ用フォーマットを関連づけるためのモジュールです。 -
Exception
# ==(other) -> bool (9058.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。......トを指定した場合は
Exception#exception を実行して変換を試みます。
//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield......lts = [2, 2, 4].map { |e | get_exception { check_long_month(e) } }
p results.map { |e| e.class }
# => [RuntimeError, RuntimeError, RuntimeError]
p results.map { |e| e.message }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]
# class, message, backtrace が同一のため... -
Exception
# inspect -> String (9028.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
Exception
. to _ tty? -> bool (9012.0) -
$stderr が変更されておらず、$stderr.tty? が真の場合は true を返します。
...$stderr が変更されておらず、$stderr.tty? が真の場合は true を返します。
[注意] 2.5.1 で追加されたメソッドです。
@see Exception#full_message......$stderr が変更されておらず、$stderr.tty? が真の場合は true を返します。
@see Exception#full_message... -
MiniTest
:: Assertions # exception _ details(exception , message) -> String (6315.0) -
与えられた例外の詳細を文字列として返します。
...与えられた例外の詳細を文字列として返します。
@param exception 例外を指定します。
@param message メッセージを指定します。... -
Exception2MessageMapper
# Fail(exception _ class = nil , *rest) -> () (6144.0) -
登録されている情報を使用して、例外を発生させます。
...m exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。
例:
class Foo
extend Exception2MessageM......apper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>
def foo
Raise NewExceptionClass, 1, 2, 3
end
end
Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。
Foo.Ra......ise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)
# という例外が発生します。... -
Exception2MessageMapper
# Raise(exception _ class = nil , *rest) -> () (6144.0) -
登録されている情報を使用して、例外を発生させます。
...m exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。
例:
class Foo
extend Exception2MessageM......apper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>
def foo
Raise NewExceptionClass, 1, 2, 3
end
end
Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。
Foo.Ra......ise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)
# という例外が発生します。... -
Exception2MessageMapper
. Fail(klass = E2MM , exception _ class = nil , *rest) -> () (6114.0) -
登録されている情報を使用して、例外を発生させます。
...@param klass 一階層上となるクラス名を指定します。
@param exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない... -
Exception2MessageMapper
. Raise(klass = E2MM , exception _ class = nil , *rest) -> () (6114.0) -
登録されている情報を使用して、例外を発生させます。
...@param klass 一階層上となるクラス名を指定します。
@param exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない... -
Exception2MessageMapper
# fail(exception _ class = nil , *rest) -> () (6113.0) -
登録されている情報を使用して、例外を発生させます。
...されている情報を使用して、例外を発生させます。
@param exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない... -
Exception2MessageMapper
:: E2MM (6016.0) -
Alias of Exception2MessageMapper
...Alias of Exception2MessageMapper... -
SignalException (6012.0)
-
捕捉していないシグナルを受け取ったときに発生します。
...きに発生します。
実際に発生したシグナル名は、
Exception#message から
「"SIG" + シグナル名」という形で得られます。
デフォルトの状態では、
以下のシグナルが SignalException を発生させます。
* SIGALRM
* SIGHUP
* SIGINT (※た......だし以下参照)
* SIGQUIT
* SIGUSR1
* SIGUSR2
* SIGTERM
なお、SIGINT シグナルを受けた場合は SignalException の下位クラスである
Interrupt が発生します。...