Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Avoid Throwing Exceptions

オープン
#548 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
objective-c

調査の方向性

まず GoogleSignIn/Sources/GIDSignIn.m を読み、例外が呼び出し元に公開されている箇所を追跡します。そのフローを issue で提案されている NSError と BOOL のアプローチと比較し、続いて、ライブラリのトップレベルの動作が、クライアントライブラリに例外を公開せずにエラーを報告することを確認します。

索引モデルが issue の本文から書いたものです。

説明

enhancement

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/GoogleSignIn-iOS のほかの issue

google/GoogleSignIn-iOS の issue をすべて見る

似ている issue

Objective-C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。