Description Usage Arguments Examples
Create an error that will stop immediately, or can be continued from.
1 |
message |
The error message |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Deferrable errors will throw immediately if no suitable calling
# handlers are established:
tryCatch(
deferrable_error("my error"),
error = identity)
# Create a deferrable error and continue from it, using
# withCallingHandlers:
value <- withCallingHandlers({
x <- 1
defer::deferrable_error("a deferrable error")
x * 2
},
deferrable_error = function(e)
invokeRestart("continue_deferrable_error"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.