Skip to content

Commit

Permalink
Merge pull request #2273 from ErikBooijCB/master
Browse files Browse the repository at this point in the history
Make GuzzleException extend Throwable whereever it's available
  • Loading branch information
sagikazarmark committed Apr 15, 2019
2 parents 3b0452a + fe346ef commit e21a982
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/Exception/GuzzleException.php
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 {}
}

0 comments on commit e21a982

Please sign in to comment.