assertthat
assertthat copied to clipboard
Option to add a class to `assert_that` error message
The rlang
package makes it possible to add classes to the error conditions (e.g. rlang::abort
). This is a convenient feature for later working with the error messages. There are for example good for programmatically responding to errors within packages. The current option is to parse the error messages but as these can be quite dynamic to make them informative to users it would be better to have error classes. An implementation would be quite simple as the class argument should be added to the assert_that
function and the assertError
function. If desirable I can make a pull request