Chain Provider catch Exception

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
backend

調査の方向性

まず最終的な Chain クラスとその provider 実行パスを読み、現在どこで例外がログに記録され、空の AddressCollection に変換されているのかを理解します。次に、Chain の provider の動作に関する近くのテストを確認し、呼び出し側が結果なしと provider エラーを確実に区別できる方法を提供し、その動作をテストでカバーすることを完了条件として定義します。

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

説明

question

Hi,

Currently, the chain provider only logs the exceptions, there is no way to catch the exceptions and we always get an empty AddressCollection in case something went wrong. There is no way to know if the collection is empty because there were no results or if an error occurred.

A simple customized solution would be to extend the class Chain and throw the exception but it's not possible since it's final. All I can do is to replicate the class (not best solution).

If there is a workaround about this I would like to hear about it, otherwise I guess it must be implemented a way to catch the erros.

Thank you.

主要言語
PHP
スター
4k
フォーク
525
平均マージ
8分
マージ済み PR(30日)
1

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

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

はじめの一歩

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

geocoder-php/Geocoder のほかの issue

geocoder-php/Geocoder の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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