Add a try catch to the menu include loop.

This commit is contained in:
Mark Crane
2014-12-27 07:25:11 +00:00
parent 4eb984f3d8
commit a6bea0aa6f
+6
View File
@@ -54,9 +54,15 @@
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_menu.php"); $config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_menu.php");
$x=0; $x=0;
foreach ($config_list as &$config_path) { foreach ($config_list as &$config_path) {
try {
include($config_path); include($config_path);
$x++; $x++;
} }
catch (Exception $e) {
echo 'exception caught: ' . $e->getMessage() . "\n";
exit;
}
}
//begin the transaction //begin the transaction
if ($db_type == "sqlite") { if ($db_type == "sqlite") {