-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve traceback()
for dispatched methods
#486
Conversation
Nice improvement. The verbose traces were bothering me, so I was setting the option to truncate them. This is much more readable though. |
I think this fixes #132, at least to the level we want to worry about for now. ... Actually I think #483 did most of the rest. The call stack is now pretty minimal:
cf. CRAN S7:
|
Co-authored-by: Hadley Wickham <[email protected]>
It was because the call had a srcref sometimes. The srcref printed as |
This is worth of a news bullet IMO. |
Currently, printing
traceback()
on an error signaled from a generic dispatched method is extremely verbose, bordering on unreadable. This is because the generic method closure is inlined into the constructed call, which is then deparsed in the traceback.With this PR, we now construct the method call with a symbol at the head. The name is intentionally non-syntatic to avoid potential clashes with the generic's arguments.
Example evaluating the following at the console:
After this PR, it prints:
Presently prints: