Skip to content

Commit b8ad012

Browse files
committed
Fix NonZeroExitCode ctor
1 parent 3d0729f commit b8ad012

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/states.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ given exit code (not equal zero).
88
"""
99
struct NonZeroExitCode <: Exception
1010
exitcode::Int
11-
end
1211

13-
function NonZeroExitCode(exitcode::Integer)
14-
exitcode == 0 && throw(ArgumentError("NonZeroExitCode exitcode must not be zero"))
15-
NonZeroExitCode(exitcode)
12+
function NonZeroExitCode(exitcode::Int)
13+
exitcode == 0 && throw(ArgumentError("NonZeroExitCode exitcode must not be zero"))
14+
new(exitcode)
15+
end
1616
end
1717

18+
NonZeroExitCode(exitcode::Integer) = NonZeroExitCode(Int(exitcode))
1819

1920

2021
"""

0 commit comments

Comments
 (0)