Can Transformer be less naive when using VisitError?
See original GitHub issueThe new VisitError is great, but it come with a problem. If I am raising an error inside a transformer function, VisitError catches it and formats it, so there’s no way to retrieve the original error.
Of course the problem in the first place is that there is a catch-all statement that does not leave any room for custom error handling. A simple handle_errors
flag that could be passed to Transformer.transform
and disable Transformer raising VisitError and letting the error go would work, but there are many ways to achieve this.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Merge branch 'lark-parser:master' into master · 31509ace09 ...
We show how, by using namespaces, Lark grammars and their transformers can be fully reused -. they don't need to care if their...
Read more >The Essence Of Strategic Programming - An inquiry into trans ...
As we will see, this dilemma can be solved with strategic program- ... The naive-innermost and innermost combinators both implement the.
Read more >THE ESSENCE OF STRATEGIC PROGRAMMING An inquiry ...
As we will see, this dilemma can be solved with strategic program- ... The naive-innermost and innermost combinators both implement the.
Read more >Generic Traversal over Typed Source Code Representations
sued not purely as an end in itself, but with relevance to and inspiration from the ... But at least this behavior can...
Read more >Réécriture et Modularité pour les Politiques de Sécurité
l'environnement des politiques et pour transformer le code non ... security requirements, that can even be stated using different languages.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pushed a fix to
master
.You can now do something like:
Is that good enough, or do you still want an option to disable VisitError wrapping?
The exception object itself is not the only thing that is lost by wrapping the exception, you also lose the exception context, so pdb post-mortem is much less helpful.