るりまサーチ

最速Rubyリファレンスマニュアル検索!
60件ヒット [1-60件を表示] (0.032秒)
トップページ > クエリ:Raise[x] > クラス:SystemCallError[x]

別のキーワード

  1. _builtin raise
  2. kernel raise
  3. fiber raise
  4. thread raise
  5. e2mmap raise

ライブラリ

キーワード

検索結果

SystemCallError#errno -> Integer | nil (13.0)

レシーバに対応するシステム依存のエラーコードを返します。

...た場合は nil を返します。

begin
raise
Errno::ENOENT
rescue Errno::ENOENT => err
p err.errno # => 2
p Errno::ENOENT::Errno # => 2
end

begin
raise
SystemCallError, 'message'
rescue SystemCallError => err
p err.errno # => ni...

SystemCallError.===(other) -> bool (7.0)

other が SystemCallError のサブクラスのインスタンスで、 かつ、other.errno の値が self::Errno と同じ場合に真を返します。そうでない場合は偽を返します。

...other が SystemCallError のサブクラスのインスタンスで、
かつ、other.errno の値が self::Errno と同じ場合に真を返します。そうでない場合は偽を返します。

従って、特に other が self.kind_of?(other) である場合には Module#=== と同様に真...
...味しかありません。

@param other 任意のオブジェクト


p Errno::EAGAIN::Errno
p Errno::EWOULDBLOCK::Errno
begin
raise
Errno::EAGAIN, "pseudo error"
rescue Errno::EWOULDBLOCK
p $!
end

# => 11
11
#<Errno::EAGAIN: pseudo error>...

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

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

... SystemCallError の直接のインスタンスではなく、サブクラスのインスタンスです。
それらのサブクラスは Errno モジュール内に定義されています。
対応するサブクラスが存在しないコードを与えた場合には、 SystemCallError...
...
@raise TypeError errno を整数に変換できないときに発生します。

例:

p SystemCallError.new("message", 2)
# => #<Errno::ENOENT: No such file or directory - message>
p SystemCallError.new(2)
# => #<Errno::ENOENT: No such file or directory>
p SystemCallError.new...
...(256)
# => #<SystemCallError: Unknown error 256>...

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

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

... SystemCallError の直接のインスタンスではなく、サブクラスのインスタンスです。
それらのサブクラスは Errno モジュール内に定義されています。
対応するサブクラスが存在しないコードを与えた場合には、 SystemCallError...
...
@raise TypeError errno を整数に変換できないときに発生します。

例:

p SystemCallError.new("message", 2)
# => #<Errno::ENOENT: No such file or directory - message>
p SystemCallError.new(2)
# => #<Errno::ENOENT: No such file or directory>
p SystemCallError.new...
...(256)
# => #<SystemCallError: Unknown error 256>...

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

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

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

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

例:

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

絞り込み条件を変える