chore: report

This commit is contained in:
cha0s 2021-02-11 18:07:24 -06:00
parent 07861db17b
commit 78416fbb72

View File

@ -18,9 +18,14 @@ function compileOp(op, latus) {
)).concat(context);
// Promises are resolved transparently.
const apply = (args) => fastApply(previous, current, args);
return evaluated.some((arg) => arg instanceof Promise)
? Promise.all(evaluated).then(apply)
: apply(evaluated);
try {
return evaluated.some((arg) => arg instanceof Promise)
? Promise.all(evaluated).then(apply)
: apply(evaluated);
}
catch (error) {
throw new Error(`Behaving ${JSON.stringify(op, null, 2)}: ${error.stack}`);
}
}
default:
throw new TypeError(`Invalid expression op: '${op.type}'`);