Avoid Throwing Exceptions
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 28/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- objective-c
- 領域
- authentication, mobile
調査の方向性
まず GoogleSignIn/Sources/GIDSignIn.m を読み、例外が呼び出し元に公開されている箇所を追跡します。そのフローを issue で提案されている NSError と BOOL のアプローチと比較し、続いて、ライブラリのトップレベルの動作が、クライアントライブラリに例外を公開せずにエラーを報告することを確認します。
索引モデルが issue の本文から書いたものです。
説明
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'.
- 主要言語
- Objective-C
- スター
- 751
- フォーク
- 282
- 平均マージ
- 4日 20時間
- マージ済み PR(30日)
- 11
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/GoogleSignIn-iOS のほかの issue
-
enhancement triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google/GoogleSignIn-iOS#621 ·
-
enhancement triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
google/GoogleSignIn-iOS#620 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
google/GoogleSignIn-iOS#440 · コメント 4 件 · リアクション 2 件 ·
-
enhancement triage
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
google/GoogleSignIn-iOS#611 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
google/GoogleSignIn-iOS#607 ·
google/GoogleSignIn-iOS の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
noah-nuebling/mac-mouse-fix#2054 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
obsproject/obs-studio#13918 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
HigherOrderCO/Bend#842 · コメント 2 件 ·