X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/f7df1f0ee10189a0d00a814003bd1f242049775d..b6fd32394a7305564d244450d49285209725a6f2:/lib/MECON/HTML/Page.php diff --git a/lib/MECON/HTML/Page.php b/lib/MECON/HTML/Page.php index b0e8429..aaac822 100644 --- a/lib/MECON/HTML/Page.php +++ b/lib/MECON/HTML/Page.php @@ -74,11 +74,14 @@ class MECON_HTML_Page extends HTML_Page { } /** - * Muestra un error a través y termina el programa. + * Muestra un error y termina el programa. */ - function error($msg) + function exitError($msg) { require_once 'MECON/HTML/Error.php'; + if (is_a($msg, 'pear_error')) { + $msg = $msg->getMessage(); + } $this->addBodyContent(new MECON_HTML_Error($msg)); $this->display(); exit;