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

Make 'options(error = function(e) traceback(2))` optional in testJob #289

Open
mb706 opened this issue Sep 27, 2022 · 0 comments
Open

Make 'options(error = function(e) traceback(2))` optional in testJob #289

mb706 opened this issue Sep 27, 2022 · 0 comments

Comments

@mb706
Copy link

mb706 commented Sep 27, 2022

I would like to run testJob() and drop to the debugger as soon as an error is thrown. However, the following prevents me from just having options(error=recover) do its work:

batchtools/R/execJob.R

Lines 50 to 51 in 4c2a476

options(error = function(e) traceback(2L))
on.exit(options(opts))

Maybe you could make this line dependent on some setting, e.g. have an option(error.execjob) or something (default function(e) traceback(2L)) and then do

options(error = getOption("error.execjob", function(e) traceback(2L)))

(btw, it would probably also be cleaner to have the on.exi() happen before the options(error = ...) 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

1 participant