tl;dr You can use {cli} and {rlang} to help create a helpful error-handling function that can prevent an eclipse. Check one two I’ve been building an ‘error helper’ function1 called check_class(). You put it inside another function to check if the user has supplied arguments of the expected class. Surprise. I did this to provide richer, more informative error output compared to a simple if () stop(). But it has a few features I wanted to record here for my own reference. In particular, ...