-
Notifications
You must be signed in to change notification settings - Fork 609
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
Report reject macro failure properly #430
Conversation
Great minds think alike. I think my #431 is a superset of what you were trying to accomplish here. |
df40c4b
to
73830a2
Compare
LOL we have opened very similar PR's, but I do not think it is a superset , my goal was to get a red dot in Xcode on failure of OCMRejec (similar to OCMVerif) by calling:
If I understand correctly I don't think your PR will solve this issue. but maybe I so should open my PR on top of yours because you add the location property, that I can reuse. |
Previously when messaging OCMReject only an exception was raised and the failure was not associated with the line and file of declaration.
73830a2
to
65f58cd
Compare
I'm afraid I don't understand the win here. With the status quo I get given information about where the rejection actually occurred which I think is more useful to me than getting information about where I asked for the rejection to be checked. |
I don't understand how do you get the information "where the rejection actually occurred" . For example for the following test:
I would like to get an error easier on line
|
Okay, I don't think it's ideal that you have to go up a few frames in the stack trace. However, I think it's not correct to report the failure in the line where the |
If you set a break point on exception raise it will any way be caught in OCMReportFailure and user can go a few frames up. this is for the case that you do not have a break point and i don't think you loose anything. |
Well, you lose consistency, which has a negative impact on developer experience. Errors should be reported consistently where they occur. The error does not occur where you set up the reject, it occurs where the method is invoked. So, if the outcome of this PR is that the error would be reported at the |
|
Previously when messaging OCMReject only an exception was raised and the
failure was not associated with the line and file of declaration.