mirror of
https://github.com/kanaka/mal.git
synced 2024-11-09 18:06:35 +03:00
nim: exit on Ctrl-D in steps 1-8
step9 and stepA had a catch handler for this but the earlier steps were missing it.
This commit is contained in:
parent
4c7b1d6af0
commit
2dedaa3919
@ -10,5 +10,6 @@ while true:
|
||||
try:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.read.eval.print
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
|
@ -43,5 +43,6 @@ while true:
|
||||
try:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.rep
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
|
@ -63,6 +63,7 @@ while true:
|
||||
try:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.rep
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
echo getCurrentException().getStackTrace()
|
||||
|
@ -91,6 +91,7 @@ while true:
|
||||
try:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.rep
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
echo getCurrentException().getStackTrace()
|
||||
|
@ -113,6 +113,7 @@ while true:
|
||||
try:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.rep
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
echo getCurrentException().getStackTrace()
|
||||
|
@ -123,6 +123,7 @@ while true:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.rep
|
||||
except Blank: discard
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
echo getCurrentException().getStackTrace()
|
||||
|
@ -158,6 +158,7 @@ while true:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.rep
|
||||
except Blank: discard
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
echo getCurrentException().getStackTrace()
|
||||
|
@ -167,6 +167,7 @@ while true:
|
||||
let line = readLineFromStdin("user> ")
|
||||
echo line.rep
|
||||
except Blank: discard
|
||||
except IOError: quit()
|
||||
except:
|
||||
echo getCurrentExceptionMsg()
|
||||
echo getCurrentException().getStackTrace()
|
||||
|
Loading…
Reference in New Issue
Block a user