getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine(); $msg[] = ''; $msg[] = $e->getTraceAsString(); echo implode("\n", $msg); }); $kernel = new AppKernel('dev', true); $kernel->loadClassCache(); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response);