Created
December 1, 2014 17:25
-
-
Save felnne/87385fdcad697afe4f6b to your computer and use it in GitHub Desktop.
Lions - Base HTTP exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Lions\Exception; | |
use Symfony\Component\HttpKernel\Exception\HttpException as BaseHttpException; | |
class HttpException extends BaseHttpException { | |
protected $statusCode = 500; | |
protected $exceptionType = 'Exception'; | |
function __construct($message = null , \Exception $previous = null, $headers = array(), $code = 0) | |
{ | |
if ($message === null) | |
{ | |
$message = $this->exceptionType; | |
} | |
parent::__construct($this->statusCode, $message, $previous, $headers, $code); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment