diff options
Diffstat (limited to 'src/Errors/Exception.php')
-rw-r--r-- | src/Errors/Exception.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Errors/Exception.php b/src/Errors/Exception.php new file mode 100644 index 0000000..ccb124e --- /dev/null +++ b/src/Errors/Exception.php @@ -0,0 +1,21 @@ +<?php + +namespace App\Errors; + +abstract class Exception extends \RuntimeException +{ + public function __construct(private ErrorCode $errorCode, string $message, int $httpCode) + { + parent::__construct($message, $httpCode); + } + + public function getErrorCode(): ErrorCode + { + return $this->errorCode; + } + + /** + * @return void + */ + abstract public function getAdditionalData(): array; +} |