X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/cf283b8f59060371d0a82fc349d265218215fcb2..b6fd32394a7305564d244450d49285209725a6f2:/lib/MECON/HTML/Page.php?ds=sidebyside diff --git a/lib/MECON/HTML/Page.php b/lib/MECON/HTML/Page.php index 85cd558..aaac822 100644 --- a/lib/MECON/HTML/Page.php +++ b/lib/MECON/HTML/Page.php @@ -73,5 +73,19 @@ class MECON_HTML_Page extends HTML_Page { parent::addBodyContent($content); } + /** + * Muestra un error y termina el programa. + */ + 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; + } + } ?> \ No newline at end of file