Closed sorawee closed 2 years ago
Questions:
#(struct:exn:fail:contract:divide-by-zero "/: division by zero" #<continuation-mark-set>)
?Any opinion? @AlexKnauth @jackfirth @samth
All pending questions are resolved, so this should now be ready for actual review + merge. A test is also added in the latest commit.
Questions:
1. Should we still print `#(struct:exn:fail:contract:divide-by-zero "/: division by zero" #<continuation-mark-set>)`?
Dunno if this was answered, but I think that if the value raised answers true to exn?
then it would be nice to just print what the error-display-handler prints. If it doesn't, however, it might be nice to indicate that, and then print the value.
@rfindler yes, that is exactly what my PR does.
Thank you! Great!
Looks good to me. It's been a long time since I've touched this code though.
@sorawee can you squash the commits here with a message that's up to date?
Done!
@giuliano from Discord raised an issue that check-not-exn interferes with errortrace. Specifically, rackunit replaces the original exception with a new one, and stuffs the original exception inside a check-info named 'exception. While this interference is by design, it gives a bad user experience because users can no longer trace back to the original exception location.
This PR solves the problem by recognizing the check-info and print its associating value using
error-display-handler
, which allows the errortracer to operate on the original exception.For example, consider:
The program outputs the following before the PR:
But it outputs the following after the PR:
Note that the output after the PR incorporates changes from https://github.com/racket/errortrace/pull/30