X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/393fb3d17e7a1d3416434e35982e1a808d1d18de..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;