$front = Pfw_Controller_Front::getInstance(); $front->getRouter()->setRoutes($_pfw_routes)->setModules($_pfw_modules); $four_oh_four = false; try { $front->dispatch(); } catch (Pfw_Exception_System $e) { $e->emitLog(); if ($_ENVIRONMENT == "development") { objp($e); exit; } $four_oh_four = true; } catch (Pfw_Exception_User $e) { $e->emitLog(); if ($_ENVIRONMENT == "development") { objp($e); exit; } $four_oh_four = true; } catch (Exception $e) { if ($_ENVIRONMENT == "development") { objp($e); exit; } $four_oh_four = true; } if ($four_oh_four) { Pfw_Loader::loadController('ErrorController'); $c = new ErrorController(); $c->fourohfourAction(); }