<?php
// ApiHttpException.php
// Copyright P.Kassel, M.Seliger, G.Trietsch, all Rights Reserved
namespace Docuform\Api\Exception;use Nyholm\Psr7\ServerRequest;use Psr\Http\Message\ServerRequestInterface;use Slim\Exception\HttpSpecializedException;class ApiHttpException extends HttpSpecializedException{public function __construct(?ServerRequestInterface $request=null,?int $code=500,?string $message=null,?string $description=null){$this->code=$code;if(empty($message))$message='Unknown error';$this->title=$code.' '.$message;if($description)$this->description=$description;parent::__construct($request?$request:new ServerRequest('',''),$message,null);}}