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