るりまサーチ

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

別のキーワード

  1. _builtin begin
  2. range begin
  3. matchdata begin
  4. arithmeticsequence begin

ライブラリ

キーワード

検索結果

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 #...

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: ps...