Improved http error handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user