Source for file page.php
Documentation is available at page.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Displays the custom error page when an uncaught exception occurs.
* @package Joomla.Libraries
* Render the error page based on an exception.
* @param Exception $error The exception for which to render the error page.
public static function render(Exception $error)
// We're probably in an CLI environment
exit($error->getMessage());
// Get the current template from the application
$template =
$app->getTemplate();
// Push the error object into the document
$document->setError($error);
$document->setTitle(JText::_('Error') .
': ' .
$error->getCode());
$data =
$document->render(
array('template' =>
$template,
'debug' =>
$config->get('debug'))
// Failsafe to get the error displayed.
exit($error->getMessage());
exit('Error displaying the error page: ' .
$e->getMessage());
Documentation generated on Tue, 19 Nov 2013 15:10:03 +0100 by phpDocumentor 1.4.3