File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ module SystemError
41
41
macro included
42
42
extend ::SystemError ::ClassMethods
43
43
44
+ # The following are macros so we can get the `errno` or `winerror` _before_
45
+ # evaluating `message` and `opts` that may change the `errno` or `winerror` value.
46
+
44
47
# Builds an instance of the exception from the current system error value (`Errno.value`).
45
48
#
46
49
# The system message corresponding to the OS error value amends the *message*.
47
50
# Additional keyword arguments are forwarded to the exception initializer `.new_from_os_error`.
48
51
macro from_errno (message , ** opts)
49
- # This is a macro in order to retrieve `Errno.value` first before evaluating `message` and `opts`.
50
52
% errno = ::Errno .value
51
53
::\{{ @type }}.from_os_error(\{{ message }}, % errno, \{{ opts.double_splat }})
52
54
end
You can’t perform that action at this time.
0 commit comments