/** Delete all buffers and print the error page. If no page was defined using weeException::setErrorPage, the default error page is shown. @param $aDebug An array containing debugging information about the error or the exception. */ public static function printErrorPage($aDebug) { while (ob_get_level()) { ob_end_clean(); } // Try to set headers to sane values if (!headers_sent()) { header('Content-Type: text/html'); header('Content-Disposition: inline'); header('Content-Encoding: identity'); } if (empty(self::$sErrorPagePath)) { self::$sErrorPagePath = ROOT_PATH . 'res/wee/error.htm'; } // Encode the debug array for XHTML $oEncoder = new weeXHTMLEncoder(); $aDebug = $oEncoder->encodeArray($aDebug); require self::$sErrorPagePath; }