-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved localisation of errors to particular arguments.
This commit does two things. First of all, it fixes a bug in which we forgot to add in default arguments when calling `_get_problem_arg`. This meant that in practice, if you had a default argument, then the very first argument would be what is reported. Second, it rearranges things into a couple of extra stack frames, for an easier debugging experience. - When looking at the main error message, this will now occur on the line that actually raised it, and not the `finally: pop_stack_memo()` line. - The argument-specific `_get_problem_arg` error is what is now attached as the cause, rather than the overall failure of the whole typechecking.
- Loading branch information
1 parent
b0bbff9
commit 6236167
Showing
2 changed files
with
100 additions
and
86 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