tidylab / decorators

Extend the behaviour of a function without explicitly modifying it
https://tidylab.github.io/decorators/
Other
12 stars 0 forks source link

Add exception decorators #1

Open harell opened 3 years ago

harell commented 3 years ago

NotImplementedError <- function(){ caller_name <- sys.call(sys.parent())[[1]] warning(paste(caller_name, "raised NotImplementedError") }

foo <- exception(foo, NotImplementedError) foo()



- [ ] see [Python Built-in Exceptions](https://docs.python.org/3/library/exceptions.html)
- [ ] see Clean Coders p.46
harell commented 3 years ago

Add exception decorator

harell commented 3 years ago

https://github.com/tidylab/exceptions

harell commented 3 years ago

https://github.com/tidylab/exceptions/issues/1