$error = sprintf($_['e_class'], 'classes/class.' . $class . '.php'); throw new Exception($error); } } catch (Exception $e) { die($e->getMessage()); } } try { /* * Load global db connector for usage across website */ $db_connect = DB::PsqlConnect(); /* * Main handler controller. We send request uri to controller, * uri is then searched for. If uri is found, * Proper handler file is loaded. */ $page = isset($_GET['page']) ? $_GET['page'] : ""; $include = new Controller($page); include $include->GetHandler(); /* * Close main database connection with sql server. */ DB::Close(); } catch (Exception $e) { /* * Serious error callout. If main loaders fail, website must * stop instantly. Error is printed out to the user. */ die($e->getMessage()); }