From b6fd32394a7305564d244450d49285209725a6f2 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 29 Mar 2004 18:16:10 +0000 Subject: [PATCH] Se renombra error a exitError() y se hace que acepte un PEAR_Error. --- lib/MECON/HTML/Page.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.43.0