るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n
  3. rsa n=
  4. openssl n
  5. openssl n=

ライブラリ

検索結果

SystemCallError#errno -> Integer | nil (18307.0)

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

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

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


なお、例外を発生させずにエラーコードを得るに...