* @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(); } }