Merge pull request #377 from asarhaddon/fix-runtests-pre-eval
[jackhill/mal.git] / crystal / step5_tco.cr
index e56db4a..66f144b 100755 (executable)
@@ -162,7 +162,9 @@ Mal.rep "(def! not (fn* (a) (if a false true)))"
 while line = Readline.readline("user> ", true)
   begin
     puts Mal.rep(line)
+  rescue e : Mal::RuntimeException
+    STDERR.puts "Error: #{pr_str(e.thrown, true)}"
   rescue e
-    STDERR.puts e
+    STDERR.puts "Error: #{e}"
   end
 end