Errors and exceptions handling, #16

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@121 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
pzinovkin
2010-03-07 17:26:44 +00:00
parent 2d7f5391f8
commit 4f7e5b00bc
7 changed files with 305 additions and 82 deletions

View File

@ -9,21 +9,4 @@
* @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();
}
}
class GeneralException extends Exception {}