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

Duplicated error dump files in stacked tryCatchLog calls #55

Closed
aryoda opened this issue Apr 20, 2020 · 0 comments
Closed

Duplicated error dump files in stacked tryCatchLog calls #55

aryoda opened this issue Apr 20, 2020 · 0 comments
Labels

Comments

@aryoda
Copy link
Owner

aryoda commented Apr 20, 2020

This code creates two dump files but should create only one:

tryCatchLog(
    tryCatchLog(
      log("a"),
      write.error.dump.file = TRUE),
    write.error.dump.file = TRUE
 )

If the inner tryCatchLog contains an error handler only one dump file will be created (correctly)
so it seams the reason is that unhandled errors bubble up (propagate) and are dumped on each tryCatchLog level.

tryCatchLog(
  tryCatchLog(
    log("a"),
    error = function(e) {
      # do something
    },
    write.error.dump.file = TRUE),
  write.error.dump.file = TRUE
)

@aryoda aryoda added bug work in progess is currently in the implementation phase labels Apr 20, 2020
@aryoda aryoda changed the title Duplicated error dump files in stacked tryCatchLog calls (without error handlers) Duplicated error dump files in stacked tryCatchLog calls Apr 20, 2020
@aryoda aryoda removed the work in progess is currently in the implementation phase label Apr 20, 2020
@aryoda aryoda closed this as completed in c9501e8 Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant