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

Remove extraneous lines from 'stack trace' on model error #226

Open
jeffeaton opened this issue Dec 9, 2020 · 0 comments
Open

Remove extraneous lines from 'stack trace' on model error #226

jeffeaton opened this issue Dec 9, 2020 · 0 comments
Assignees

Comments

@jeffeaton
Copy link
Collaborator

Amongst the stack trace returned on a model error -- the traceback inside hintr_run_model() at the end is useful debugging information for us. The rest of it is not and frustrates users to get computer jibberish.

ANC testing data not found for year .
stack trace
# fb0264bbd4df3c235570ea76f02bd925
hintr:::main_worker()
rrq::rrq_worker(hintr_queue_id(main_worker_args(args)$queue_id, TRUE), hear
w$loop()
worker_loop(self, immediate)
tryCatch({ tryCatch(worker$step(immediate), interrupt = worker_catch_in
tryCatchList(expr, classes, parentenv, handlers)
tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names
doTryCatch(return(expr), name, parentenv, handler)
tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
tryCatchOne(expr, names, parentenv, handlers[[1]])
doTryCatch(return(expr), name, parentenv, handler)
tryCatch(worker$step(immediate), interrupt = worker_catch_interrupt(worker)
tryCatchList(expr, classes, parentenv, handlers)
tryCatchOne(expr, names, parentenv, handlers[[1]])
doTryCatch(return(expr), name, parentenv, handler)
worker$step(immediate)
worker_step(self, immediate)
worker$run_task(task[[2]])
worker_run_task(self, task_id)
withCallingHandlers(expression_eval_safely(task$expr, e), progress = functi
expression_eval_safely(task$expr, e)
tryCatch(withCallingHandlers(eval(expr, envir), warning = function(e) warni
tryCatchList(expr, classes, parentenv, handlers)
tryCatchOne(expr, names, parentenv, handlers[[1]])
doTryCatch(return(expr), name, parentenv, handler)
withCallingHandlers(eval(expr, envir), warning = function(e) warnings$add(e
eval(expr, envir)
eval(expr, envir)
hintr:::run_model(data, options, results_dir, prerun_dir, language)
naomi::hintr_run_model(data, options, output_path, spectrum_path, coarse_ou
naomi_prepare_data(data, options)
select_naomi_data(naomi_mf = naomi_mf, survey_hiv_indicators = survey, anc_
anc_testing_clients_mf(anc_clients_year_t2, anc_testing, naomi_mf, anc_clie
stop(t_("ANC_DATA_MISSING_FOR_YEAR", list(missing_year = paste(missing_year
.handleSimpleError(function (e) trace$add(utils::limitedLabels(sys.calls()
h(simpleError(msg, call))

Are we able to parse this before returning to user to remove everything between hintr:::main_worker() and hintr::run_model(...), but keep the end bit?

So return looks like this:

ANC testing data not found for year .
stack trace
# fb0264bbd4df3c235570ea76f02bd925


naomi::hintr_run_model(data, options, output_path, spectrum_path, coarse_ou
naomi_prepare_data(data, options)
select_naomi_data(naomi_mf = naomi_mf, survey_hiv_indicators = survey, anc_
anc_testing_clients_mf(anc_clients_year_t2, anc_testing, naomi_mf, anc_clie
stop(t_("ANC_DATA_MISSING_FOR_YEAR", list(missing_year = paste(missing_year
.handleSimpleError(function (e) trace$add(utils::limitedLabels(sys.calls()
h(simpleError(msg, call))
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

2 participants