SystemError::ClassMethods - Crystal 1.21.0

# module SystemError::ClassMethods

##
Defined in:

system_error.cr

##
Instance Method Summary

- #from_os_error(message : String | Nil, os_error : Errno | WinError | WasiError | Nil, **opts)

  Builds an instance of the exception from an os_error value.

##
Instance Method Detail

def from_os_error(message : String | Nil, os_error : Errno | WinError | WasiError | Nil, **opts) #

Builds an instance of the exception from an os_error value.

The system message corresponding to the OS error value amends the message. Additional keyword arguments are forwarded to the exception initializer `.new_from_os_error`.