checkmate icon indicating copy to clipboard operation
checkmate copied to clipboard

be able to output little prefix strings on failed assertion / comments

Open berndbischl opened this issue 8 years ago • 1 comments

sometimes it is really need to inform the the user WHY you are enforcing a certain thing.

i would love to be able to do this

asssertFactor(f, na.ok = FALSE, comment = "'f' shouldnt be NA because bla")

and "comment" is pasted directly before the failed assertion error message.

that would be super useful in many cases to make user feedback better

berndbischl avatar Jan 25 '17 17:01 berndbischl

I support the idea of the possibility to include a comment if the assertation fails. This can be very useful in aiding the user in how to correct their arguments to the functions. However, I will prefer to have the comment pasted directly after the "standard" message. Then you keep the well-considered way checkmate presents the error messages and the comment is used to explain and help the user.

PetterHopp avatar May 20 '21 15:05 PetterHopp