るりまサーチ

最速Rubyリファレンスマニュアル検索!
8件ヒット [1-8件を表示] (0.101秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:p[x] > クエリ:call[x] > クラス:Exception[x]

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. rsa p
  5. dsa p

ライブラリ

検索結果

Exception#full_message(highlight: true, order: :bottom) -> String (3032.0)

例外の整形された文字列を返します。

...は 2.5.1 で追加されました。

@param highlight エスケープシーケンスによる文字装飾をつけるかどうかを指定します。
デフォルト値は Exception.to_tty? の返り値と同じです。

@param order :top か :bottom で指定する必要があ...
...セージの上(top)か下(bottom)かを指定します。
デフォルト値は Exception.to_tty? が真なら :bottom で偽なら :top です。

//emlist[例][ruby]{
begin
raise "test"
rescue => e
p
e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in...
...e[1m)\n\e[m"
$stderr = $stdout
p
e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = STDERR
p
e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}

@see Exception.to_tty?...
...文字装飾がついています。


@param highlight エスケープシーケンスによる文字装飾をつけるかどうかを指定します。
デフォルト値は Exception.to_tty? の返り値と同じです。

@param order :top か :bottom で指定する必要があ...