This module can be included in any
Exception subclass that is used to wrap some system error (
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.
class MyError < Exception include SystemError end MyError.from_errno("Something happened")
© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.