29 lines
566 B
PHP
29 lines
566 B
PHP
![]() |
<?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();
|
||
|
}
|
||
|
}
|