Skip to content

Commit 8e53551

Browse files
authored
Impement ValidatorException instead of Exception
1 parent 2676692 commit 8e53551

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/InvalidRequestPayloadException.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
namespace Fesor\RequestObject;
44

55
use Symfony\Component\Validator\ConstraintViolationListInterface;
6+
use Symfony\Component\Validator\Exception\ValidatorException;
67

7-
class InvalidRequestPayloadException extends \Exception
8+
class InvalidRequestPayloadException extends ValidatorException
89
{
910
private $requestObject;
1011

@@ -18,8 +19,6 @@ class InvalidRequestPayloadException extends \Exception
1819
*/
1920
public function __construct(RequestObject $requestObject, ConstraintViolationListInterface $errors)
2021
{
21-
parent::__construct();
22-
2322
$this->requestObject = $requestObject;
2423
$this->errors = $errors;
2524
}

0 commit comments

Comments
 (0)