assertthat icon indicating copy to clipboard operation
assertthat copied to clipboard

Option to add a class to `assert_that` error message

Open bart1 opened this issue 3 years ago • 0 comments

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

bart1 avatar Jan 18 '22 09:01 bart1