Skip to content
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

Adding traceback() info #74

Closed
HeidiSeibold opened this issue Mar 7, 2017 · 5 comments
Closed

Adding traceback() info #74

HeidiSeibold opened this issue Mar 7, 2017 · 5 comments

Comments

@HeidiSeibold
Copy link

I asked a question about whether to add traceback-output during the ROpenSci community call and @jennybc asked me to open an issue. So here it is 🍰

What I imagine could look like the sessionInfo() tab, that one can open if they want to.
I.e. something like reprex::reprex(rnorm(10), venue = "gh", si = TRUE, tb = TRUE) where additionally to the session-info-tab there will also appear a traceback-tab.

The question came to me because I was asked to add the traceback in an issue I recently opened: mlr-org/mlr#1490

@hadley
Copy link
Member

hadley commented Apr 3, 2017

I think reprex should probably add the traceback() by default by using a custom error handler

@hadley
Copy link
Member

hadley commented May 25, 2017

Actually this is more challenging than I thought because reprex uses rmarkdown/knitr, which eats errors in an internal tryCatch().

@wlandau
Copy link

wlandau commented Mar 15, 2019

For what it's worth, I have started using evaluate::try_capture_stack() as a temporary workaround.

code <- quote(identity(stop("msg")))
env <- environment()
error <- evaluate::try_capture_stack(code, env)
error$message
#> [1] "msg"
error$call
#> identity(stop("msg"))
error$calls
#> [[1]]
#> identity(stop("msg"))
#> 
#> [[2]]
#> stop("msg")

Created on 2019-03-15 by the reprex package (v0.2.1)

@jennybc
Copy link
Member

jennybc commented Mar 15, 2019

I suspect the long-term solution to this is going to be #230 Entrace base errors?

@jennybc
Copy link
Member

jennybc commented May 17, 2019

Closing with the rationale that #230 represents the improvements needed.

@jennybc jennybc closed this as completed May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants