groovy: implement conj
[jackhill/mal.git] / coffee / step1_read_print.coffee
index 28edd1b..d5ab6b7 100644 (file)
@@ -21,7 +21,9 @@ while (line = readline.readline("user> ")) != null
     console.log rep line
   catch exc
     continue if exc instanceof reader.BlankException
-    if exc.stack then console.log exc.stack
-    else              console.log exc
+    if exc.stack? and exc.stack.length > 2000
+      console.log exc.stack.slice(0,1000) + "\n  ..." + exc.stack.slice(-1000)
+    else if exc.stack? console.log exc.stack
+    else               console.log exc
 
 # vim: ts=2:sw=2