summaryrefslogtreecommitdiff
path: root/src/Errors/Exception.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-08-14 14:37:56 +0200
committerDaniel Weipert <git@mail.dweipert.de>2025-08-14 14:37:56 +0200
commitc135fcf9041c604b32827a1cb027010bca5915ab (patch)
tree95a2331d5f0bc4a736aa0e716330c39b3fa1ea26 /src/Errors/Exception.php
parent3f4b51b99a4f4dc41dbdce7f34afe7e15d3d426e (diff)
POST login possible
Diffstat (limited to 'src/Errors/Exception.php')
-rw-r--r--src/Errors/Exception.php21
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;
+}