summaryrefslogtreecommitdiff
path: root/src/Errors/Exception.php
blob: 4e871b57e58f87dacf8ea1f216e02e2d3ee0c9e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace App\Errors;

use Matrix\Enums\ErrorCode;

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;
}