るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

クラス

キーワード

検索結果

Exception#message -> String (54634.0)

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

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

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

Exception#to_s -> String (9334.0)

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

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

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

Exception#inspect -> String (358.0)

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

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

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

SignalException#signm -> String (358.0)

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

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

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