4 * Generic exception that is not expected to be recoverable.
5 * @todo Internationalization
7 class XHTMLCompiler_Exception
extends Exception
10 * In-depth HTML message on the nature of the error.
15 * @param $code HTTP status code you wish to return
16 * @param $message Brief title of the error
17 * @param $details Details on the error (can be HTML)
19 public function __construct($code = 500, $message = false, $details = false) {
20 parent
::__construct($message, $code);
21 $this->details
= $details;
24 /** Returns details of exception */
25 public function getDetails() {return $this->details
;}
27 public function __toString() {
28 return $this->getCode() . ': ' . $this->getMessage() . "\n" .
29 $this->getDetails() . "\n\n" . parent
::__toString() . "\n";