Skip to content

Defer silently swallows errors? #148

@hadley

Description

@hadley
f <- function() {
  on.exit(stop("!"))
}
f()
#> Error in f(): !

f2 <- function() { 
  withr::defer(stop("!")) 
}
f2()

Created on 2020-09-01 by the reprex package (v0.3.0.9001)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions