Browse files

Add stack traces

  • Loading branch information...
1 parent d03440a commit 1af884802fc8bc6f004c0423c1652f549688015f @Connorhd committed Dec 27, 2009
Showing with 2 additions and 0 deletions.
  1. 0 .dotest/last
  2. +1 −0 debug.js
  3. +1 −0 index.html
View
0 .dotest/last
No changes.
View
1 debug.js
@@ -210,6 +210,7 @@ function evalStr (str, id) {
} catch (err) {
error = true;
output.result = err;
+ output.result.stack = output.result.stack.substring(0,output.result.stack.indexOf('at eval at evalStr')-4);
}
output.error = error;
output.str = str;
View
1 index.html
@@ -88,6 +88,7 @@
response = '<div class="response error">'
+ ' <code class="command">'+data.str+'</code>'
+ ' <code class="result">Error: '+data.result.message+'</code>'
+ + ' <pre class="stack">' + data.result.stack + '</pre>'
+ '</div>'
;
}

0 comments on commit 1af8848

Please sign in to comment.