module SystemError::ClassMethods

Defined in:

system_error.cr

Instance Method Summary

Instance Method Detail

def from_errno(message : String, **opts) #

Builds an instance of the exception from the current system error value (Errno.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.


[View source]
def from_errno(message : String? = nil, errno : Errno? = nil, **opts) #

DEPRECATED Use .from_os_error instead


[View source]
def from_os_error(message : String?, 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.


[View source]
def from_winerror(message : String?, **opts) #

Builds an instance of the exception from the current windows error value (WinError.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.


[View source]
def from_wsa_error(message : String? = nil, **opts) #

Builds an instance of the exception from the current Windows Socket API error value (WinError.wsa_value).

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


[View source]