Skip to content

Instantly share code, notes, and snippets.

@felnne
Created December 1, 2014 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felnne/87385fdcad697afe4f6b to your computer and use it in GitHub Desktop.
Save felnne/87385fdcad697afe4f6b to your computer and use it in GitHub Desktop.
Lions - Base HTTP exception
<?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