Add more original context to HTTP exception
This commit is contained in:
parent
ea38609e8b
commit
3f8e4606a2
|
@ -12,6 +12,6 @@ class MatrixHttpLibException extends MatrixException {
|
||||||
public function __construct(\Exception $originalException, string $method, string $endpoint) {
|
public function __construct(\Exception $originalException, string $method, string $endpoint) {
|
||||||
$msg = "Something went wrong in %s requesting %s: %s";
|
$msg = "Something went wrong in %s requesting %s: %s";
|
||||||
$msg = sprintf($msg, $method, $endpoint, $originalException);
|
$msg = sprintf($msg, $method, $endpoint, $originalException);
|
||||||
parent::__construct($msg);
|
parent::__construct($msg, $originalException->getCode(), $originalException);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue