Beispiel #1
0
/**
 * writeException function.
 * 
 * @access public
 * @param mixed $exception
 * @param mixed $exit. (default: NULL)
 * @return void
 */
function writeException($exception, $exit = NULL)
{
    require AOX_MODULE_PATH . "/ErrorModule.class.php";
    $module = new ErrorModule();
    $module->setTitle(get_class($exception));
    $module->setMessage($exception);
    $module->setRedirect(false);
    $module->display();
    if ($exit !== NULL) {
        $exception->setExit($exit);
    }
    $exception->doExit();
}
Beispiel #2
0
}
set_exception_handler('writeException');
OutlineTpl::globalAssign('pageTitle', 'aoxPages Devel');
try {
    aoxPages::setDB($dbHost, $dbUser, $dbPassword, $dbName, $dbSystem);
} catch (Exception $e) {
    writeException($e);
}
try {
    $_config = new Config();
    $configID = $_config->getOption('standardConfigID');
    $_config->resetConfig($configID);
} catch (Exception $e) {
    writeException($e);
}
$getModule = $_GET['module'];
if (empty($getModule)) {
    $getModule = $_config->getOption('standardModule');
}
$module = NULL;
if (AbstractModule::isValidModule($getModule, true)) {
    require AOX_MODULE_PATH . "/" . $getModule . ".class.php";
    $module = new $getModule();
} else {
    require AOX_MODULE_PATH . "/ErrorModule.class.php";
    $module = new ErrorModule();
    $module->setTitle("Module-Error");
    $module->setMessage("The module you selected was not found. The administrator was informed about this error.");
    $module->setRedirect(false);
}
$module->display();