るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. etc age
  2. etc age=
  3. cookie max_age
  4. passwd age
  5. passwd age=

モジュール

キーワード

検索結果

Exception#exception(error_message) -> Exception (81997.0)

引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。

引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。

Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。

@param error_message エラーメッセージを表す文字列を指定します。

//emlist[例][ruby]{
begin
# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogeho...

Exception#message -> String (45304.0)

エラーメッセージをあらわす文字列を返します。

エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}

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

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

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

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

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

@param message_format メッセージのフォーマットを指定します。
Kernel.#sprintf のフォーマット文字列と同じ形式を使用できます...

Exception2MessageMapper#def_exception(exception_name, message_format, superclass = StandardError) -> Class (36976.0)

exception_name という名前の例外クラスを定義します。

exception_name という名前の例外クラスを定義します。

@param exception_name 定義する例外クラスの名前をシンボルで指定します。

@param message_format メッセージのフォーマット。

@param superclass 定義する例外のスーパークラスを指定します。
省略すると StandardError を使用します。

Exception#to_s -> String (36004.0)

エラーメッセージをあらわす文字列を返します。

エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}

絞り込み条件を変える

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

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

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

@param exception_class 例外クラス。

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

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

例:

class Foo
extend Exception2MessageMapper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>...

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

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

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

@param exception_class 例外クラス。

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

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

例:

class Foo
extend Exception2MessageMapper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>...

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

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

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

@param exception_class 例外クラス。

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

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

Exception2MessageMapper#bind(cl) -> () (18004.0)

@todo

@todo

@param cl xxx

Gem::Commands::LockCommand#complain(message) -> () (322.0)

指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。

指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。

@param message 表示するメッセージを指定します。

@raise Gem::Exception コマンドラインオプションに --strict が指定されている場合に発生します。

絞り込み条件を変える