]> BookStack Code Mirror - bookstack/blob - app/Exceptions/HttpFetchException.php
c445896c01e13f87b1ad9cd7a7826bccbee6a0ff
[bookstack] / app / Exceptions / HttpFetchException.php
1 <?php
2
3 namespace BookStack\Exceptions;
4
5 class HttpFetchException extends PrettyException
6 {
7     /**
8      * Construct exception within BookStack\Uploads\HttpFetcher.
9      */
10     public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null)
11     {
12         parent::__construct($message, $code, $previous);
13
14         if ($previous) {
15             $this->setDetails($previous->getMessage());
16         }
17     }
18
19     public function getStatusCode(): int
20     {
21         return 500;
22     }
23 }