Skip to content
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

differentiate verification error from mock crash #16

Merged
merged 1 commit into from
Jun 21, 2012

Conversation

quetzalcoatl
Copy link
Contributor

When a verification error occurs, the library throws MockException with a proper message. It is OK, but for some corner cases, it would be nicer, if the user code that catches that exception were able to discover whether it is a real error (like mocking nonvirtual method), or just verification failure.

I suppose the best way would be to expose a subclass - VerificationError : MockException to report them, but for the sake of simplicity, I've currently added a trivial MockException.IsVerificationError boolean property

kzu added a commit that referenced this pull request Jun 21, 2012
differentiate verification error from mock crash
@kzu kzu merged commit 7fa3e0a into devlooped:master Jun 21, 2012
@kzu
Copy link
Contributor

kzu commented Jun 21, 2012

Thanks for the clean fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants