Skip to content

Commit 985668c

Browse files
committed
Merge pull request #112 from mhinz/master
Raise Interrupt instead of StandardExit
2 parents f3836a3 + a51b873 commit 985668c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/vimgolf/cli.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def put(id = nil)
105105
challenge.start
106106
raise RetryException
107107
when :quit
108-
raise StandardExit
108+
raise Interrupt
109109
end
110110
end
111111
end
@@ -128,12 +128,12 @@ def put(id = nil)
128128
raise RetryException
129129
when :x
130130
next unless upload?(challenge)
131-
raise StandardExit
131+
raise Interrupt
132132
when :retry
133133
challenge.start
134134
raise RetryException
135135
when :quit
136-
raise StandardExit
136+
raise Interrupt
137137
end
138138
end
139139

@@ -150,7 +150,7 @@ def put(id = nil)
150150
retry
151151
end
152152

153-
rescue Interrupt, StandardError, StandardExit
153+
rescue Interrupt, StandardError
154154
VimGolf.ui.info "\nThanks for playing!"
155155
rescue Exception => e
156156
VimGolf.ui.error "Uh oh, something went wrong! Error: #{e}"

0 commit comments

Comments
 (0)