るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.069秒)

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

モジュール

キーワード

検索結果

Exception2MessageMapper#Fail(exception_class = nil, *rest) -> () (21220.0)

登録されている情報を使用して、例外を発生させます。

...値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。

例:

class Foo
extend Exception2MessageMapper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>...
...ss, 1, 2, 3
end
end

Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。

Foo.Raise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)...

Exception2MessageMapper#def_e2message(exception_class, message_format) -> Class (9331.0)

すでに存在する例外クラス exception_class に、 エラーメッセージ用フォーマット message_format を関連づけます。

...用フォーマット message_format を関連づけます。

このフォーマットは Exception2MessageMapper#Raise,
Exception2MessageMapper#Fail で使用します。

@param exception_class メッセージを登録する例外クラスを指定します。

@param message_format メッセー...

Exception2MessageMapper#fail(exception_class = nil, *rest) -> () (9202.0)

登録されている情報を使用して、例外を発生させます。

...して、例外を発生させます。

@param exception_class 例外クラス。

@param rest メッセージに埋め込む値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。...

Exception2MessageMapper#Raise(exception_class = nil, *rest) -> () (6120.0)

登録されている情報を使用して、例外を発生させます。

...値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。

例:

class Foo
extend Exception2MessageMapper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>...
...ss, 1, 2, 3
end
end

Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。

Foo.Raise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)...