You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
566 B

<?php
/**
* @copyright NetMonsters <team@netmonsters.ru>
* @link http://netmonsters.ru
* @package Majestic
* @subpackage exception
* @since 2010-02-26
* @version SVN: $Id$
* @filesource $URL$
*/
class GeneralException extends Exception
{
protected $code = 500;
protected function sendHeader()
{
if (!headers_sent()) {
header('HTTP/1.0 500 Internal Server Error');
}
}
public function toHtml()
{
$this->sendHeader();
return 'Exception caught: ' . $this->getMessage();
}
}