friendica-github/src/Network/HTTPException.php

38 lines
774 B
PHP
Raw Normal View History

<?php
2024-08-24 15:27:00 +02:00
// Copyright (C) 2010-2024, the Friendica project
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
//
// SPDX-License-Identifier: AGPL-3.0-or-later
namespace Friendica\Network;
use Exception;
/**
* Throwable exceptions to return HTTP status code
*
* This list of Exception has been extracted from
* here http://racksburg.com/choosing-an-http-status-code/
*/
abstract class HTTPException extends Exception
{
2021-10-31 04:54:24 +00:00
protected $httpdesc = '';
protected $explanation = '';
public function __construct(string $message = '', Exception $previous = null)
{
parent::__construct($message, $this->code, $previous);
}
2021-10-31 04:54:24 +00:00
public function getDescription()
{
return $this->httpdesc;
}
public function getExplanation()
{
return $this->explanation;
}
}