module SystemError::ClassMethods
Defined in:
system_error.crInstance Method Summary
- #from_errno(message : String, **opts)
Builds an instance of the exception from the current system error value (
Errno.value
). - #from_errno(message : String? = nil, errno : Errno = nil, **opts)
DEPRECATED Use
.from_os_error
instead - #from_os_error(message : String?, os_error : Errno | WinError | Nil, **opts)
Builds an instance of the exception from an os_error value.
- #from_winerror(message : String?, **opts)
Builds an instance of the exception from the current windows error value (
WinError.value
). - #from_wsa_error(message : String? = nil, **opts)
Builds an instance of the exception from the current Windows Socket API error value (
WinError.wsa_value
).
Instance Method Detail
def from_errno(message : String, **opts)Source
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
.
def from_errno(message : String? = nil, errno : Errno = nil, **opts)Source
DEPRECATED Use .from_os_error
instead
def from_os_error(message : String?, os_error : Errno | WinError | Nil, **opts)Source
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
.
def from_winerror(message : String?, **opts)Source
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
.
def from_wsa_error(message : String? = nil, **opts)Source
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.
© 2012–2021 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.2.1/SystemError/ClassMethods.html