Closed dshemetov closed 3 weeks ago
This might be helpful:
Added some code to forecaster_pred
that puts you in browser or dumps vars on error. But this should probably be refactored later.
@brookslogan suggests withCallingHandlers
asdf = function() {x = 42; stop("SOIEJFIOJ")}
withCallingHandlers(asdf(), error = function(e) {recover()})
Enter a frame number, or 0 to exit
1: withCallingHandlers(asdf(), error = function(e) {
recover()
})
2: asdf()
3: #1: stop("SOIEJFIOJ")
4: .handleSimpleError(function (e)
{
recover()
}, "SOIEJFIOJ", base::quote(a
5: h(simpleError(msg, call))
Other options: globalCallingHandlers
or something from rlang
or a specific epipredict PR or options(error = )
.
purrr::auto_browse
is neat, but often doesn't drop you where you actually want to debug.
Improved considerably since and with #122
When targets fails, it often doesn't provide a full traceback, but only a final error message. Can we improve this? Can we have this even with parallelization?
Part of a broader issue to improve debugging and error handling.