るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
10件ヒット [1-10件を表示] (0.039秒)
トップページ > バージョン:2.3.0[x] > クエリ:error_message[x] > ライブラリ:ビルトイン[x] > 種類:特異メソッド[x]

別のキーワード

  1. logger error
  2. openssl error
  3. logger error?
  4. getoptlong error
  5. openssl error_string

キーワード

検索結果

SystemCallError.new(error_message) -> SystemCallError (337.0)

SystemCallError オブジェクトを生成して返します。

SystemCallError オブジェクトを生成して返します。

@param error_message エラーメッセージを表す文字列

例:

p SystemCallError.new("message")
# => #<SystemCallError: unknown error - message>

SystemCallError.new(error_message, errno) -> SystemCallError (337.0)

整数 errno に対応する Errno::EXXX オブジェクトを生成して返します。

整数 errno に対応する Errno::EXXX オブジェクトを生成して返します。

整数 errno をシステムコールで発生したエラーの原因を示すコードであると解釈し、
対応する例外クラスのインスタンスを生成して返します。

生成されるオブジェクトは SystemCallError の直接のインスタンスではなく、サブクラスのインスタンスです。
それらのサブクラスは Errno モジュール内に定義されています。
対応するサブクラスが存在しないコードを与えた場合には、 SystemCallError の直接のインスタンスが生成されます。

エラーコードの取り得る値および意味はシステムに依存し...

Exception.exception(error_message = nil) -> Exception (334.0)

例外オブジェクトを生成して返します。

例外オブジェクトを生成して返します。

@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。

//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}

//emlist[例][ruby]{
e = E...

Exception.new(error_message = nil) -> Exception (334.0)

例外オブジェクトを生成して返します。

例外オブジェクトを生成して返します。

@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。

//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}

//emlist[例][ruby]{
e = E...

Errno::EXXX.new(error_message) -> Errno::EXXX (331.0)

Errno::EXXX オブジェクトを生成して返します。

Errno::EXXX オブジェクトを生成して返します。

@param error_message エラーメッセージを表す文字列

p Errno::ENOENT.new
# => #<Errno::ENOENT: No such file or directory>
p Errno::ENOENT.new('message')
# => #<Errno::ENOENT: No such file or directory - message>

絞り込み条件を変える

NameError.new(error_message = "", name = nil) -> NameError (331.0)

例外オブジェクトを生成して返します。

例外オブジェクトを生成して返します。

@param error_message エラーメッセージを表す文字列です

@param name 未定義だったシンボルです


例:

err = NameError.new("message", "foo")
p err # => #<NameError: message>
p err.name # => "foo"

NoMethodError.new(error_message = "", name = nil, args = nil) -> NoMethodError (331.0)

例外オブジェクトを生成して返します。

例外オブジェクトを生成して返します。

@param error_message エラーメッセージを表す文字列です

@param name 未定義だったシンボルです

@param args メソッド呼び出しに使われた引数です


例:

nom = NoMethodError.new("message", "foo", [1,2,3])
p nom.name
p nom.args

# => "foo"
[1, 2, 3]

SystemExit.new(status = 0, error_message = "") -> SystemExit (331.0)

SystemExit オブジェクトを生成して返します。

SystemExit オブジェクトを生成して返します。

@param status 終了ステータスを整数で指定します。

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

例:

ex = SystemExit.new(1)
p ex.status # => 1

SystemCallError.new(errno) -> SystemCallError (37.0)

整数 errno に対応する Errno::EXXX オブジェクトを生成して返します。

整数 errno に対応する Errno::EXXX オブジェクトを生成して返します。

整数 errno をシステムコールで発生したエラーの原因を示すコードであると解釈し、
対応する例外クラスのインスタンスを生成して返します。

生成されるオブジェクトは SystemCallError の直接のインスタンスではなく、サブクラスのインスタンスです。
それらのサブクラスは Errno モジュール内に定義されています。
対応するサブクラスが存在しないコードを与えた場合には、 SystemCallError の直接のインスタンスが生成されます。

エラーコードの取り得る値および意味はシステムに依存し...

Errno::EXXX.new() -> Errno::EXXX (31.0)

Errno::EXXX オブジェクトを生成して返します。

Errno::EXXX オブジェクトを生成して返します。

@param error_message エラーメッセージを表す文字列

p Errno::ENOENT.new
# => #<Errno::ENOENT: No such file or directory>
p Errno::ENOENT.new('message')
# => #<Errno::ENOENT: No such file or directory - message>

絞り込み条件を変える