From 3af9846d4ecc1e0274833740fd21012afe9ef51f Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Sun, 20 Dec 2009 20:34:08 +0000 Subject: Error handling functions added, and applied git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@380 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- modules.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'modules.php') diff --git a/modules.php b/modules.php index 96bb241..5eaf705 100644 --- a/modules.php +++ b/modules.php @@ -51,6 +51,20 @@ for($chars = 0; $chars <= strlen($load_temp); ++$chars) } } */ + +/* If the error stack has recieved messages, output each failure in a clean fashion */ +global $error_stack_messages; +if(!empty($error_stack_messages)) +{ + $messageBuffer = NULL; + foreach($error_stack_messages as $order => $error) + { + $messageBuffer .= "

Stack Order:$order
$error

"; + } + ReportError($messageBuffer); + //exit(1); +} + if(isset($load) && !empty($load) && !isset($file)) { if(file_exists("modules/" . $load)) -- cgit