Skip to content

Avoid Throwing Exceptions #548

@yuval-ngtnuma

Description

@yuval-ngtnuma

Is your feature request related to a problem you're having? Please describe.
GoogleSignIn/Sources/GIDSignIn.m is the only place that exposes exceptions. This is done in contrast to the Google style guide which in turn is aligned with Apple's Exception Programming Topics.

Describe the solution you'd like
Instead, error objects should be used: you should take care to catch such exceptions at the top level of the library and translate them into an appropriate return code or state. Clang for instance pass a **NSError and return a BOOL.

Describe alternatives you've considered
N/A

Additional context
I am receiving crashes for Google Sign-In iOS plugin for Flutter, and it seems to be the case for react-native as well. Using exceptions is less informative for the client library, and is bound to become 'unhandled'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions