2021-06-26 15:23:15 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace BookStack\Exceptions;
|
2018-12-23 15:34:38 +00:00
|
|
|
|
2023-06-14 14:09:52 +02:00
|
|
|
class HttpFetchException extends PrettyException
|
2019-01-27 15:59:23 +05:30
|
|
|
{
|
2023-06-14 14:09:52 +02:00
|
|
|
/**
|
|
|
|
|
* Construct exception within BookStack\Uploads\HttpFetcher.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null)
|
|
|
|
|
{
|
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
|
|
|
|
|
|
if ($previous) {
|
|
|
|
|
$this->setDetails($previous->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getStatusCode(): int
|
|
|
|
|
{
|
|
|
|
|
return 500;
|
|
|
|
|
}
|
2019-01-27 15:59:23 +05:30
|
|
|
}
|