stack traces are starting to work

This commit is contained in:
Danny Yoo 2011-08-30 13:04:40 -04:00
parent 36e3fb39cf
commit 84d404af0c
3 changed files with 6 additions and 3 deletions

View File

@ -5,5 +5,6 @@
"one"
(* x (f (sub1 x)))))
(f 0)
(list (f 3)
(f 4))

View File

@ -137,9 +137,9 @@
(format "RUNTIME.makePath(~s)"
(path->string val))]
[(vector? val)
(format "RUNTIME.makeVector(~s)"
(format "RUNTIME.makeVector(~a)"
(string-join (for/list ([elt (vector->list val)])
(loop elt))
(loop elt))
","))]
[(box? val)
(format "RUNTIME.makeBox(~s)"

View File

@ -435,12 +435,14 @@ var invokeMainModule = function() {
appNames = contMarkSet.ref(plt.runtime.getTracedAppKey(MACHINE));
while (plt.baselib.lists.isPair(appNames)) {
appName = appNames.first;
console.log(appName);
MACHINE.params.currentErrorDisplayer(
MACHINE,
$('<div/>').text(' at ' + appName.elts[0] +
', line ' + appName.elts[2] +
', column ' + appName.elts[3])
.addClass('stacktrace')
.css('margin-left', '10px')
.css('whitespace', 'pre')
.css('color', 'red'));
appNames = appNames.rest;
}