facebook/facebook-ios-sdk — pull request #546 by odyth (2013-06-07 00:51:24+00:00)
Title: downgraded session exceptions to just errors.

Some of the NSExceptions thrown by FBSession are totally recoverable and should instead just be NSError. There is also no mention in the documentation that these methods can throw exceptions. Its also super weird that these methods will throw exceptions when they takes in a completionHandler that has an error property.

A typical usage is a button that asks the user to post a message double clicking this button would result in an app crash since two calls to reauthorizeWithPermissions before the first one has finished would trigger an exception. Since the reauthorizeHandler property is not public the app has to internally track if the first call has finished or not, this can get messy. Instead its much simpilar if the second call simply returns an error, the application can then see that it was and move forward.