2024-04-18 20:30:26 -04:00
|
|
|
<?php
|
|
|
|
namespace Incoviba\Common\Implement\Exception;
|
|
|
|
|
|
|
|
use Throwable;
|
2024-06-18 22:41:03 -04:00
|
|
|
use Exception;
|
2024-04-18 20:30:26 -04:00
|
|
|
|
2024-06-18 22:41:03 -04:00
|
|
|
class HttpResponse extends Exception
|
2024-04-18 20:30:26 -04:00
|
|
|
{
|
2024-06-18 22:41:03 -04:00
|
|
|
public function __construct($reason = "", $message = "", $code = 0, Throwable $previous = null)
|
2024-04-18 20:30:26 -04:00
|
|
|
{
|
2024-06-18 22:41:03 -04:00
|
|
|
$this->reason = "HTTP Reason: {$reason}";
|
2024-04-18 20:30:26 -04:00
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
}
|
2024-06-18 22:41:03 -04:00
|
|
|
protected string $reason;
|
|
|
|
public function getReason(): string
|
|
|
|
{
|
|
|
|
return $this->reason;
|
|
|
|
}
|
2024-04-18 20:30:26 -04:00
|
|
|
}
|