<?php
declare(strict_types=1); namespace App\Exceptions; use Exception; use Throwable; class HttpException extends Exception { protected int $statusCode; protected array $details; public function __construct(int $statusCode, string $message, array $details = [], Throwable $previous = null) { parent::__construct($message, $statusCode, $previous); $this->statusCode = $statusCode; $this->details = $details; } public function getStatusCode(): int { return $this->statusCode; } public function getDetails(): array { return $this->details; } } 