aboutsummaryrefslogtreecommitdiff
path: root/docs/bqn.js
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-10-25 22:43:11 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-10-25 22:48:18 -0400
commit125a4ed86b6c2047253d8f107d3c95af5d528025 (patch)
tree1b4d0e478b37e49ee8e3eb6aa5af5ce8466e3105 /docs/bqn.js
parentf1673cf6b2736c84a320ed50da8d16109d4ea8eb (diff)
Format errors in REPL based on source
Diffstat (limited to 'docs/bqn.js')
-rw-r--r--docs/bqn.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/bqn.js b/docs/bqn.js
index 329dd83c..3c6d4c5b 100644
--- a/docs/bqn.js
+++ b/docs/bqn.js
@@ -82,8 +82,7 @@ let run = (B,O,S) => { // Bytecode, Objects, Sections/blocks
// Runtime
let assertFn = pre => (x,w) => {
- if (x!==1) throw Error(pre + (has(w)?(pre?": ":"")+w.join(""):""));
- return x;
+ if (x!==1) throw {src:pre, message:w}; return x;
}
let arr = (r,sh) => {r.sh=sh;return r;}
let list = l => arr(l,[l.length]);