Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better ErgoTree evaluation error messages #353

Closed
greenhat opened this issue Aug 2, 2021 · 0 comments · Fixed by #720
Closed

Better ErgoTree evaluation error messages #353

greenhat opened this issue Aug 2, 2021 · 0 comments · Fixed by #720
Milestone

Comments

@greenhat
Copy link
Member

greenhat commented Aug 2, 2021

Motivation

The error message only describes what IR node evaluation failed without any context information.

The following error message communicates the context better:

...
val v5 = OUTPUTS(2)
                ^^^ - index out of bounds
...

For a deserialized ErgoTree the source code can be generated by pretty printer #371 .

Solution

Ideally, we'd want a pretty printed tree with evaluation results(values) printed at ValDef's.

One of the options is to add a source span to every node and pretty print the tree on an error at the top-level evaluator (ErgoTree).

@greenhat greenhat added this to the v1.0.0 milestone Aug 2, 2021
@greenhat greenhat moved this from To do to In progress in greenhat WIP Jul 14, 2023
@greenhat greenhat changed the title Better evaluation error messages Better ErgoTree evaluation error messages Jul 19, 2023
@github-project-automation github-project-automation bot moved this from In progress to Done in greenhat WIP Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant