aboutsummaryrefslogtreecommitdiff
path: root/docs/repl.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/repl.js')
-rw-r--r--docs/repl.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/repl.js b/docs/repl.js
index 05f870a9..14927537 100644
--- a/docs/repl.js
+++ b/docs/repl.js
@@ -14,9 +14,12 @@ let repl = ()=>{
try {
doc.rslt.textContent=fmt(bqn(s));
} catch(e) {
- //if (console&&console.error) console.error(e.stack);
+ let s=e.src, w=e.message, i=-1;
+ if (s==="Compiler"&&w.sh[0]===2) [i,w]=w;
+ if (s==="!") w=w?fmt(w).replace(/^/gm,'! '):'! Error';
+ else w=w.sh?w.join(""):w;
doc.rslt.classList.add('err');
- doc.rslt.textContent=e.message||'Error';
+ doc.rslt.textContent=w;
}
}, 0);
}