1
1
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:
Joel Martin 2024-08-28 09:33:28 -05:00
parent 4c7b1d6af0
commit 2dedaa3919
8 changed files with 8 additions and 0 deletions

View File

@ -10,5 +10,6 @@ while true:
try:
let line = readLineFromStdin("user> ")
echo line.read.eval.print
except IOError: quit()
except:
echo getCurrentExceptionMsg()

View File

@ -43,5 +43,6 @@ while true:
try:
let line = readLineFromStdin("user> ")
echo line.rep
except IOError: quit()
except:
echo getCurrentExceptionMsg()

View File

@ -63,6 +63,7 @@ while true:
try:
let line = readLineFromStdin("user> ")
echo line.rep
except IOError: quit()
except:
echo getCurrentExceptionMsg()
echo getCurrentException().getStackTrace()

View File

@ -91,6 +91,7 @@ while true:
try:
let line = readLineFromStdin("user> ")
echo line.rep
except IOError: quit()
except:
echo getCurrentExceptionMsg()
echo getCurrentException().getStackTrace()

View File

@ -113,6 +113,7 @@ while true:
try:
let line = readLineFromStdin("user> ")
echo line.rep
except IOError: quit()
except:
echo getCurrentExceptionMsg()
echo getCurrentException().getStackTrace()

View File

@ -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()

View File

@ -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()

View File

@ -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()