Skip to content

Commit e844cb6

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: [Notifier] Allow passing a previous throwable to exceptions
2 parents 99a4c34 + 71d3d7f commit e844cb6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Exception/TransportException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TransportException extends RuntimeException implements TransportExceptionI
2121
private $response;
2222
private $debug = '';
2323

24-
public function __construct(string $message, ResponseInterface $response, int $code = 0, \Exception $previous = null)
24+
public function __construct(string $message, ResponseInterface $response, int $code = 0, \Throwable $previous = null)
2525
{
2626
$this->response = $response;
2727
$this->debug .= $response->getInfo('debug') ?? '';

Exception/UnsupportedSchemeException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class UnsupportedSchemeException extends LogicException
169169
/**
170170
* @param string[] $supported
171171
*/
172-
public function __construct(Dsn $dsn, string $name = null, array $supported = [])
172+
public function __construct(Dsn $dsn, string $name = null, array $supported = [], \Throwable $previous = null)
173173
{
174174
$provider = $dsn->getScheme();
175175
if (false !== $pos = strpos($provider, '+')) {
@@ -187,6 +187,6 @@ public function __construct(Dsn $dsn, string $name = null, array $supported = []
187187
$message .= sprintf('; supported schemes for notifier "%s" are: "%s"', $name, implode('", "', $supported));
188188
}
189189

190-
parent::__construct($message.'.');
190+
parent::__construct($message.'.', 0, $previous);
191191
}
192192
}

0 commit comments

Comments
 (0)