Пример #1
0
 public function handle(Request $request)
 {
     try {
         $controller = new AppController($this->packages);
         $action = $controller->build($request)->getAction();
         $context = new Context($controller->getParameters(), $request->cookie(), $request->get(), $request->post(), $request->server());
         $this->dispatch($action, $context);
     } catch (Exception $e) {
         clean_all_buffers();
         $this->handleException($e, $request);
     }
 }
Пример #2
0
function error_handler($errno, $errstr, $errfile, $errline)
{
    clean_all_buffers();
    throw new ErrorException(sprintf('%s in %s on line %d', $errstr, $errfile, $errline), 0, $errno, $errfile, $errline);
}