Skip to content

withOptions suppresses warnings #124

Description

@markmfredrickson

I have noticed that when balanceTest runs and immediately prints, warning messages are suppressed. I have traced this behavior to the use of the finally option to the tryCatch, which we use in withOptions. Brief example:

> f <- function() { warning("Should print")}
> 
> f()
Warning message:
In f() : Should print
> 
> oldOpts <- options()
> 
> tryCatch(f())
Warning message:
In f() : Should print
> 
> tryCatch(f(), finally = options(oldOpts))
> 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions