This repository was archived by the owner on Sep 7, 2023. It is now read-only.

Description
Is your feature request related to a problem? Please describe.
When a clause throws an error (either through an enforce expression or as an explicit throw in the logic), that error is caught after logic execution and turned into a low-level JavaScript error with a string.
It would be nice if the error being thrown in JavaScript was made part of the standard Accord Project error model (see https://docs.accordproject.org/docs/ref-errors.html).
The code is currently located in the Ergo runtime here:
|
function unwrapError(result) { |
Describe the solution you'd like
A new kind of Accord Project exception for Logic errors (LogicException ?) in https://docs.accordproject.org/docs/ref-errors.html.
Change the runtime behaviour to raise one of those.
Maybe better location information, and details notably for enforce exceptions.