[eluser]toopay[/eluser]
You put my code at wrong function. Above code is for 'show_404' at Exception class, while yours is should be something like :
Code:
// ...
function show_error($heading, $message, $template = 'error_general', $status_code = 500)
{
set_status_header($status_code);
$message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
if (ob_get_level() > $this->ob_level + 1)
{
ob_end_flush();
}
ob_start();
include(APPPATH.'errors/'.$template.EXT);
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
}