munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
9.05k stars 1.06k forks source link

chapter 8 challenges: handle ctrl + D (EOT) signal gracefully #1179

Closed peshala-prabhapoorna closed 18 hours ago

peshala-prabhapoorna commented 1 month ago

the code for the first question results in a crash when ctrl + D is pressed (EOT signal), and prints a Java stack trace. the commits here fixes that issue and also prints a blank line before exiting for aesthetics.