src/Exception/IsmpGeneralErrorException.php 1 location
|
@@ 7-16 (lines=10) @@
|
| 4 |
|
|
| 5 |
|
namespace Lamoda\IsmpClient\Exception; |
| 6 |
|
|
| 7 |
|
final class IsmpGeneralErrorException extends \RuntimeException implements IsmpClientExceptionInterface |
| 8 |
|
{ |
| 9 |
|
public static function becauseOfError(\Throwable $exception): self |
| 10 |
|
{ |
| 11 |
|
return new static(sprintf( |
| 12 |
|
'Request to ISMP finished with error "%s"', |
| 13 |
|
$exception->getMessage() |
| 14 |
|
), 0, $exception); |
| 15 |
|
} |
| 16 |
|
} |
| 17 |
|
|
src/Exception/IsmpSerializerErrorException.php 1 location
|
@@ 7-16 (lines=10) @@
|
| 4 |
|
|
| 5 |
|
namespace Lamoda\IsmpClient\Exception; |
| 6 |
|
|
| 7 |
|
final class IsmpSerializerErrorException extends \RuntimeException implements IsmpClientExceptionInterface |
| 8 |
|
{ |
| 9 |
|
public static function becauseOfError(\Throwable $exception): self |
| 10 |
|
{ |
| 11 |
|
return new static(sprintf( |
| 12 |
|
'Serialization error: "%s"', |
| 13 |
|
$exception->getMessage() |
| 14 |
|
), 0, $exception); |
| 15 |
|
} |
| 16 |
|
} |
| 17 |
|
|