Open harell opened 3 years ago
BaseException= R6::R6Class("BaseException", public = list(handler = stop))
NameError = R6::R6Class(inherits = BaseException)
NameError.set("public", "initilize", function(name) self.handler(name))
NameError = NameError$new()
NameError('HiThere')
Consider the mechanism behind
stop()
.See
utils::withCallingHandlers
in https://adv-r.hadley.nz/conditions.htmlReferences