public
Description: Go figure
Clone URL: git://github.com/matthieu/witty.git
Search Repo:
Trying to not exit in flame at the first error.
matthieu (author)
Fri Jul 18 23:31:34 -0700 2008
commit  933eabb1d1fbcfe56e14114a0b69ba60e1002eac
tree    dc75f9a6056541be88fdbf88ad18ce7e79f6c11e
parent  7a05e02ed70a8e3cd43b488ed9a1885466f01da2
...
29
30
31
32
33
 
 
 
 
 
 
 
 
34
35
36
...
29
30
31
 
 
32
33
34
35
36
37
38
39
40
41
42
0
@@ -29,8 +29,14 @@ function repl() {
0
   while (line != 'quit' && line != 'exit') {
0
     var struct = parse(line);
0
     if (struct) {
0
- var res = eval_(struct, env);
0
- print("-> " + res);
0
+ try {
0
+ var res = eval_(struct, env);
0
+ print("-> " + res);
0
+ } catch(e) {
0
+ print("error: " + e);
0
+ if (e.stack) print(e.stack);
0
+ else if (e.fileName) print(e.fileName + ":" + e.lineNumber);
0
+ }
0
     }
0
     pr("> ");
0
     line = new String(readline());

Comments

    No one has commented yet.