るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. etc sc_message_passing
  2. etc sc_2_pbs_message
  3. getoptlong error_message
  4. mkmf message
  5. kernel message

クラス

キーワード

検索結果

Exception#exception(error_message) -> Exception (82120.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#exception -> self (81520.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 (81331.0)

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

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

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

Exception#to_s -> String (36031.0)

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

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

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

Exception#==(other) -> bool (27184.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 D...

絞り込み条件を変える

Exception#inspect -> String (27094.0)

self のクラス名と message を文字列にして返します。

self のクラス名と message を文字列にして返します。

//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}

SignalException#signm -> String (9058.0)

self.message のエイリアスです。

self.message のエイリアスです。

//emlist[例][ruby]{
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
puts e.signm # => SIGHUP
end
//}