Render an exception to the console.

@param  \Exception  $e
@return void
498965
protected function renderForConsole($e, ConsoleOutput $output = null)
    {
        if (is_null($output)) {
            $output = new ConsoleOutput();
        }

        $this->getExceptionHandler()->renderForConsole($output, $e);
    }
1186039
protected function renderException(RequestContract $request, Exception $e)
    {
        return $this->app[ExceptionHandlerContract::class]->render($request, $e);
    }
624344
protected function handleUncaughtException($e)
    {
        $handler = $this->resolveExceptionHandler();

        if ($e instanceof Error) {
            $e = new FatalThrowableError($e);
        }

        $handler->report($e);

        if ($this->runningInConsole()) {
            $handler->renderForConsole(new ConsoleOutput(), $e);
        } else {
            $handler->render($this->make('request'), $e)->send();
        }
    }
844262
protected function handleException($request, Exception $e)
    {
        $handler = $this->app->make(ExceptionHandler::class);

        return $handler->render($request, $e);
    }
1062300
public function handleException(Throwable $e): void
    {
        $exceptionHandlerPath = null;

        if (($module = Application::getCurrentModule()) !== null) {
            $exceptionHandlerPath = Application::getModulePath($module) . 'controllers/ExceptionHandler.php';
            if (!is_file($exceptionHandlerPath)) {
                $exceptionHandlerPath = Application::getApplicationPath('controllers/ExceptionHandler.php');
            }
        } else {
            $exceptionHandlerPath = Application::getApplicationPath('controllers/ExceptionHandler.php');
        }

        if (is_file($exceptionHandlerPath)) {
            require_once $exceptionHandlerPath;
            $exceptionHandler = new \ExceptionHandler($e);

            if ($exceptionHandler instanceof ResponseExceptionHandler) {
                $exceptionHandler->exec();
            } else {
                $routeException = new ServerException('Your ExceptionHandler is not instance of ResponseExceptionHandler, can not continue');
                Log::emergency($routeException);
                Application::terminateWithError('Your ExceptionHandler is not instance of ResponseExceptionHandler, can not continue');
            }
        } else {
            $exceptionHandler = new ResponseExceptionHandler($e);
            $exceptionHandler->exec();
        }
    }
202337
public function render($request, Exception $e)
    {
        $response = $this->exceptionHandler->render($request, $e);

        if ($this->shouldRenderException($response) === true) {
            $_SERVER = $request->server();
            $response->setContent(
                $this->debuggerManager->exceptionHandler($e)
            );
        }

        return $response;
    }
26825
protected function renderException($output, \Throwable $e)
    {
        $this->laravel[ExceptionHandler::class]->renderForConsole($output, $e);
    }
1184242
public static function display( Exception $e )
	{
		$view	= UI_HTML_Exception_View::render( $e );
		print( self::wrapExceptionView( $view ) );
	}
1303570
protected function handleException(Exception $e)
    {
        $handler = $this->app->make(ExceptionHandler::class);

        $handler->report($e);

        try {
            $handler->renderForConsole(
                $this->app->make(OutputInterface::class), $e
            );
        } catch (Throwable $e) {
            //
        }
    }
890155
public function handleException( \Throwable $e ) : bool
    {
        // Render exception
        $output = $this->renderer->output( $e );
    
        // output
        fwrite(STDERR, $output . PHP_EOL);
    
        return true;
    }
1129877
protected function handleViewException($e)
	{
		$e = new \ErrorException($this->getMessage($e), 0, 1, $e->getFile(), $e->getLine(), $e);

		ob_get_clean(); throw $e;
	}
300901
public function report(Exception $e)
    {
        if ($this->exceptionHandler !== null) {
            $this->exceptionHandler->report($e);
        }
    }
1167634
public static function exceptionHandler(\Exception $e)
    {
//echo __METHOD__;
        $error = Error::createFromException($e, Response::STATUS_ERROR);
        $status = method_exists($e, 'getStatus') ? $e->getStatus() : Response::STATUS_ERROR;
        Container::get('response')
            ->setStatus($status);
        Container::get('controller')
            ->addError($error)
            ->serve();
    }
66078
protected function showErrorAndDie(\Exception $e)
    {
        $this->error('And error occurs connecting to the api url: ' . $this->url);
        if ($e->getResponse()) {
            $this->error('Status code: ' . $e->getResponse()->getStatusCode() . ' | Reason : ' . $e->getResponse()->getReasonPhrase());
        } else {
            $this->error('Exception occurs. Message: ' . $e->getMessage());
        }

        die();
    }
1135885
protected function renderException($exception)
    {
        $contentType = static::getContentType();
        $dataType = explode('/', $contentType);
        $dataType = isset($dataType[1]) ? $dataType[1] : 'text';

        switch ($dataType) {
            case 'json':
                $output = $this->getJsonMessage($exception);
                break;
                
            case 'xml':
                $output = $this->getXmlMessage($exception);
                break;
            
            case 'html':
                $output = $this->getHtmlMessage($exception);
                break;
                
            case 'text':
            default:
                $output = $this->getTextMessage($exception);
        }
        
        echo $output;
    }
1027466
final public function reportException(\Exception $e)
	{
		$this->_addRow(
			array($e->getMessage()),
			$this->_formatLocation($e->getFile(), $e->getLine()),
			self::WARN
		);
	}
522131
protected function renderException($exception)
  {
    if ($this->myDebug)
    {
      if ($exception instanceof ErrorException)
      {
        $message = $exception->getName();
      }
      elseif ($exception instanceof NamedException)
      {
        $message = "Exception ({$exception->getName()})";
      }
      else
      {
        $message = 'Exception';
      }

      $message .= " '".get_class($exception)."'";
      $message .= ' with message '.$exception->getMessage();
      $message .= "\n\n";
      $message .= "in ".$exception->getFile().':'.$exception->getLine()."\n";
      $message .= "\n";
      $message .= "Stack trace:\n";
      $message .= $exception->getTraceAsString();
    }
    elseif ($exception instanceof NamedException)
    {
      $message = $exception->getName().': '.$exception->getMessage();
    }
    else
    {
      $message = 'Error: '.$exception->getMessage();
    }

    echo $message, "\n";
  }