/** * Handle an uncaught exception from the application. * * Note: Most exceptions can be handled via the try / catch block in * the HTTP and Console kernels. But, fatal error exceptions must * be handled differently since they are not normal exceptions. * * @param \Exception $e * @return void */ public function handleException($e) { $this->getExceptionHandler()->report($e); if (kernel::runningInConsole()) { $this->renderForConsole($e); } else { $this->renderHttpResponse($e); } }