diff options
Diffstat (limited to 'WpfTest/HttpResponseStatus/InternalServerError.php')
| -rw-r--r-- | WpfTest/HttpResponseStatus/InternalServerError.php | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/WpfTest/HttpResponseStatus/InternalServerError.php b/WpfTest/HttpResponseStatus/InternalServerError.php deleted file mode 100644 index 11b67f3..0000000 --- a/WpfTest/HttpResponseStatus/InternalServerError.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -namespace WpfTest\HttpResponseStatus; - -use WpfTest\GlobalConfig; -use WpfTest\HttpResponseStatus; - -class InternalServerError extends \Exception implements HttpResponseStatus { - public function __construct(\Throwable $reason, ?string $context = null) { - $this->message = $reason::class . ': ' . $reason->getMessage(); - if (isset($context)) { - $this->message .= " [$context]"; - } - if (GlobalConfig::getInstance()->shouldReportTraces()) { - $this->message .= "\n" . $reason->getTraceAsString(); - } - } - public function httpCode(): int { - return 500; - } - public function httpReason(): string { - return "Internal Server Error"; - } -}
\ No newline at end of file |
