static function handleTestError($errno, $errstr, $errfile, $errline, $context, $backtraceInfo) { // generate a unique id for this entry in the error log $errorId = uniqid(); // format the backtrace and log the error $errorLine = self::formatErrorLineHtml($errno, $errstr, $errfile, $errline, $context, $backtraceInfo); error_log("<p>error #{$errorId}:</p>", 3, instance_dir . '/var/log/error.html'); error_log('<p>' . $errorLine . '</p>', 3, instance_dir . '/var/log/error.html'); $backtraceInfo = $backtraceInfo ? $backtraceInfo : debug_backtrace(); $backtrace = new Backtrace($backtraceInfo); error_log($backtrace->toHtml(), 3, instance_dir . '/var/log/error.html'); // wipe out all output buffers while (ob_get_level()) { ob_end_clean(); } // display the error code echo "error #{$errorId}"; // $scriptUrl = script_url; // $baseUrl = base_url; // include(app_dir . "/error.html"); die; }