New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expect_error could handle the error class #530

Closed
gaborcsardi opened this Issue Oct 1, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@gaborcsardi
Member

gaborcsardi commented Oct 1, 2016

I mean, I want to specify that I expect a given error class, instead of specifying the error message. AFAICT this is currently not possible.

@hadley

This comment has been minimized.

Member

hadley commented Dec 15, 2016

Great idea. I'd be happy to review a PR :)

@hadley

This comment has been minimized.

Member

hadley commented Dec 15, 2016

And presumably this should also cover warnings and messages. I'll have a go at it.

@hadley

This comment has been minimized.

Member

hadley commented Dec 15, 2016

Oh messages() and warnings() are bit trickier because there might be more than one. I'll leave those for now.

@hadley hadley closed this in 5fdf26b Dec 15, 2016

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Dec 15, 2016

Great! Thanks! This will allow proper error testing once we have proper error objects in R packages. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment