Skip to content
Prev 60326 / 63424 Next

capturing multiple warnings in tryCatch()

Simon's suggestion with withCallingHandlers() is the correct way.
Also, note that if you use tryCatch() to catch warnings, you're
*interrupting* the evaluation of the expression of interest, e.g.
hey
Warning caught: boom
[1] 3.14

Note how it never completes your expression.

/Henrik

On Thu, Dec 2, 2021 at 1:14 PM Simon Urbanek
<simon.urbanek at r-project.org> wrote: