4 * Throwable exceptions to return HTTP status code
6 * This list of Exception has been extracted from
7 * here http://racksburg.com/choosing-an-http-status-code/
10 namespace Friendica\Network;
14 abstract class HTTPException extends Exception
16 public $httpdesc = '';
18 public function __construct($message = '', Exception $previous = null)
20 parent::__construct($message, $this->code, $previous);
22 if (empty($this->httpdesc)) {
23 $classname = str_replace('Exception', '', str_replace('Friendica\Network\HTTPException\\', '', get_class($this)));
24 $this->httpdesc = preg_replace("|([a-z])([A-Z])|",'$1 $2', $classname);