Print full evaluation error to output window #2030
Draft
+57
−38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a PoC to demonstrate the REPL output behaviour I would like to see when editor evaluations throw errors. This is to address #2029 - please read that issue first to get a better idea of the problem this is trying to solve.
This is just a draft to show what I would like and to open the discussion on how we want this to work in practice. I'm sure people will have a lot of differing opinions on this one - probably requiring some calva configuration to control the behaviour.
This change will result in evaluation errors looking as follows:
Simple error:

More complex error with additional data:

This addresses the three main points of the issue raised:
:datakey.This implementation is quite primitive - I would guess some errors also contain other information besides
:datathat would need to be printed. This would need to be taken into account for a real implementation.Checklist
devbranch. (Or have specific reasons to target some other branch.)published. (Sorry for the nagging.)[Unreleased]entry inCHANGELOG.md, linking the issue(s) that the PR is addressing.ci/circleci: buildtest.npm run prettier-format)npm run eslintbefore creating your PR, or runnpm run eslint-watchto eslint as you go).Ping @PEZ, @bpringe, @corasaurus-hex, @Cyrik