-
Notifications
You must be signed in to change notification settings - Fork 269
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
Handling NSErrors returned from factory methods that produce errors. #326
Comments
First of all, use HEAD version of Typhoon. (Recently I did minor change to get this feature working)
NSValue with pointer would be unwrapped (old Typhoon feature to unwrap non-object values) for method invocation Option 1 (Explicit ownership rules on caller side)
Caller:
Option 2 (Explicit ownership rules on factory method side) Method declaration:
Caller:
IMPORTANT NOTICE
Otherwise you'll get the crash |
@alexgarbarev Looks like tests are failing since last commits. |
@jasperblues, yes, reverted back. This failure related to #325 - not this ticket |
I think we should update documentation for that common case (just faced with that and had to search for that ticket) |
By using
-withFactory:selector:
it's possible to invoke factory methods that throw errors. e.g.The question is, how can the error be processed if it arises?
The text was updated successfully, but these errors were encountered: