# Attach packages
library(xpectr)
# Note: The use of `try()` is just for package-testing purposes
# \donttest{
a <- 0
try(stop_if(a == 0, "'a' cannot be 0."))
try(warn_if(a == 0, "'a' was 0."))
message_if(a == 0, "'a' was so kind to be 0.")
# }
Run the code above in your browser using DataLab