module SystemError


This module can be included in any Exception subclass that is used to wrap some system error (Errno or WinError)

When included it provides a from_errno method (and from_winerror on Windows) to create exception instances with a description of the original error. It also adds an #os_error property that contains the original system error.

For example:

class MyError < Exception
  include SystemError

MyError.from_errno("Something happened")

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def os_error : Errno? #