-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate more informative syntax errors
This commit refactors the exception/error classes and their handling, keeps Hy source strings and their originating file information (if any) closer to the origin of an exception (so that calling code isn't responsible for annotating exceptions), and provides minimally intrusive traceback print-out filtering via a context manager that temporarily alters `sys.excepthook` (enabled by default for the Hy interpreter). It also provides an environment variable, `HY_COLORED_ERRORS`, and package variable, `hy.errors.__colored_errors`, that enables/disables manual error coloring. Closes #657, closes #1510, closes #1429.
- Loading branch information
1 parent
d2319dc
commit 79c54e1
Showing
15 changed files
with
700 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.