Improved http error handling
This commit is contained in:
parent
b2165cdf22
commit
4236a9a105
55 changed files with 282 additions and 135 deletions
|
@ -31,15 +31,11 @@ use Exception;
|
|||
*/
|
||||
abstract class HTTPException extends Exception
|
||||
{
|
||||
public $httpdesc = '';
|
||||
public $httpdesc = '';
|
||||
public $explanation = '';
|
||||
|
||||
public function __construct($message = '', Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $this->code, $previous);
|
||||
|
||||
if (empty($this->httpdesc)) {
|
||||
$classname = str_replace('Exception', '', str_replace('Friendica\Network\HTTPException\\', '', get_class($this)));
|
||||
$this->httpdesc = preg_replace("|([a-z])([A-Z])|",'$1 $2', $classname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue