-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 #2273 from ErikBooijCB/master
Make GuzzleException extend Throwable whereever it's available
- Loading branch information
Showing
1 changed file
with
17 additions
and
10 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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
<?php | ||
namespace GuzzleHttp\Exception; | ||
|
||
/** | ||
* @method string getMessage() | ||
* @method \Throwable|null getPrevious() | ||
* @method mixed getCode() | ||
* @method string getFile() | ||
* @method int getLine() | ||
* @method array getTrace() | ||
* @method string getTraceAsString() | ||
*/ | ||
interface GuzzleException {} | ||
use Throwable; | ||
|
||
if (interface_exists(Throwable::class)) { | ||
interface GuzzleException extends Throwable {} | ||
} else { | ||
/** | ||
* @method string getMessage() | ||
* @method \Throwable|null getPrevious() | ||
* @method mixed getCode() | ||
* @method string getFile() | ||
* @method int getLine() | ||
* @method array getTrace() | ||
* @method string getTraceAsString() | ||
*/ | ||
interface GuzzleException {} | ||
} | ||
|