-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from benglass/master
Add ChainNoResultException for aggregating ChainProvider exceptions.
- Loading branch information
Showing
3 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the Geocoder package. | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @license MIT License | ||
*/ | ||
|
||
namespace Geocoder\Exception; | ||
|
||
/** | ||
* @author Ben Glassman <bglassman@gmail.com> | ||
*/ | ||
class ChainNoResultException extends NoResultException | ||
{ | ||
|
||
/** | ||
* Exceptions from chained providers | ||
* | ||
* @var array | ||
*/ | ||
private $exceptions = array(); | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param string $message | ||
* @param array $exceptions Array of Exception instances | ||
*/ | ||
public function __construct($message = "", array $exceptions = array()) | ||
{ | ||
parent::__construct($message); | ||
$this->exceptions = $exceptions; | ||
} | ||
|
||
/** | ||
* Get the exceptions from chained providers | ||
*/ | ||
public function getExceptions() | ||
{ | ||
return $this->exceptions; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters