Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make GuzzleException extend Throwable whereever it's available
- Loading branch information
1 parent
fa74540
commit 3b74cb4
Showing
1 changed file
with
26 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,29 @@ | ||
<?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)) { | ||
/** | ||
* @method string getMessage() | ||
* @method Throwable|null getPrevious() | ||
* @method mixed getCode() | ||
* @method string getFile() | ||
* @method int getLine() | ||
* @method array getTrace() | ||
* @method string getTraceAsString() | ||
*/ | ||
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 {} | ||
} | ||
|