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
Discussion: Conversion of NSException to NSError #20
Comments
I believe handling ObjC exceptions is indeed an error prone overkill, so let's get rid of that behavior. |
Hi @shoumikhin, |
@shali3 The docs don't explicitly mention exceptions at all and in my opinion this is fine. The library doesn't catch exceptions anymore which is the default and expected behavior for any library in Objective C so it's not necessary to state that exceptions are not catched. |
From the docs (link in my previous comment):
|
It's talking about throwing an error, not an exception which most probably refers to Swift Errors but you're right it's confusing at least. Maybe the word "Swift" should be added. |
From an ObjC perspective when I read error I think of |
There are several places where FBLPromise uses Objective-C exception handling to catch
NSException
s and convert them toNSError
s. I see several problems in this approach:-fobjc-arc-exceptions
) but this has to be used for all code participating in the stack where an exception is thrown which in most cases can't be guaranteed.What was the reasoning behind recovering from exceptions?
The text was updated successfully, but these errors were encountered: