From: Leandro Lucarella Date: Mon, 29 Mar 2004 18:16:10 +0000 (+0000) Subject: Se renombra error a exitError() y se hace que acepte un PEAR_Error. X-Git-Tag: svn_import~75 X-Git-Url: https://git.llucax.com/mecon/meconlib.git/commitdiff_plain/b6fd32394a7305564d244450d49285209725a6f2?ds=inline Se renombra error a exitError() y se hace que acepte un PEAR_Error. --- 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;