Render the given exception.

@param  \Exception  $e
@param  \Symfony\Component\Console\Output\OutputInterface  $output
@return void
510735
public function renderException($e, $output)
	{
		// If we have an exception handler instance, we will call that first in case
		// it has some handlers that need to be run first. We will pass "true" as
		// the second parameter to indicate that it's handling a console error.
		if (isset($this->exceptionHandler))
		{
			$this->exceptionHandler->handleConsole($e);
		}

		parent::renderException($e, $output);
	}
737887
public function renderForConsole($output, Exception $e)
    {
        if ($this->exceptionHandler !== null) {
            $this->exceptionHandler->renderForConsole($output, $e);
        }
    }
407601
public function exception($e)
    {
        $this->setParams(
            $e->getCode(),
            $e->getMessage(),
            $e->getFile(),
            $e->getLine(),
            $e->getTraceAsString());

        return $this->render();
    }
887840
public function render($request, Exception $e)
    {
        if (method_exists($e, 'render') && $response = $e->render($request)) {
            return Router::toResponse($request, $response);
        } elseif ($e instanceof Responsable) {
            return $e->toResponse($request);
        }

        $e = $this->prepareException($e);

        if ($e instanceof HttpResponseException) {
            return $e->getResponse();
        } elseif ($e instanceof AuthenticationException) {
            return $this->unauthenticated($request, $e);
        } elseif ($e instanceof ValidationException) {
            return $this->convertValidationExceptionToResponse($e, $request);
        }

        return $request->expectsJson()
                        ? $this->prepareJsonResponse($request, $e)
                        : $this->prepareResponse($request, $e);
    }
1186039
protected function renderException(RequestContract $request, Exception $e)
    {
        return $this->app[ExceptionHandlerContract::class]->render($request, $e);
    }
1303023
public function renderException($exception)
	{
		if (!$this->getOption('v', 0))
		{
			$this->out('')->out($exception->getMessage());

			return;
		}

		parent::renderException($exception);
	}
1288508
protected function displayCliException($e)
    {
        echo 'Exception', PHP_EOL,
        $this->highlight($e->getMessage()),
        'File', PHP_EOL,
        $this->highlight($e->getFile() . ' on line ' . $e->getLine()),
        'Trace', PHP_EOL,
        $this->highlight($e->getTraceAsString());

        if ($this->autoExit) {
            exit($this->getExitCode($e));
        }
    }
652184
public function report(Exception $e)
    {
        try {
            $logger = Zilf::$container->getShare('log');
        } catch (Exception $ex) {
            throw $e;
        }

        $logger->error($e->getMessage(), ['exception' => $e]);
    }
1174966
public function render($request, Exception $e)
    {
        if ($this->isHttpException($e))
        {
            if ($request->segment(1) == config('expendable.admin_base_uri') && !config('app.debug'))
            {
                return app('Distilleries\Expendable\Http\Controllers\Backend\Base\ErrorController')->callAction("display", [$e, $e->getStatusCode()]);
            }
        }

        return parent::render($request, $e);
    }
168640
public function renderException(\Exception $exception)
    {
        $verbose = $this->console ? $this->console->get('verbose', 0) : 0;

        if (!$verbose) {
            $this->out()->err($exception->getMessage());

            return;
        }

        /** @var $exception \Exception */
        $class = get_class($exception);

        // @codingStandardsIgnoreStart
        $output = <<<EOF
<error>Exception '{$class}' with message:</error> <fg=cyan;options=bold>{$exception->getMessage()}</fg=cyan;options=bold>
<info>in {$exception->getFile()}:{$exception->getLine()}</info>

<error>Stack trace:</error>
{$exception->getTraceAsString()}
EOF;
        // @codingStandardsIgnoreEnd

        $this->out('');
        $this->err($output);
    }
112396
public function render($e)
    {
        if ($e instanceof Throwable) {
            $e = $this->throwableToException($e);
        }
        
        if ($this->shouldntBacktrace($e)) {
            return with(new ExceptionHandler(env('APP_DEBUG')))->handle($e);
        }
        
        return with(new SymfonyExceptionHandler(env('APP_DEBUG')))->handle($e);
    }
907910
public function handleException(\Throwable $e, $display_mode = ErrorDisplayModes::CONSOLE)
    {
        switch($display_mode)
        {
            case ErrorDisplayModes::HTML:
                $renderer = new HtmlDebugtraceRenderer();
                break;

            case ErrorDisplayModes::CONSOLE:
            default:
                $renderer = new ConsoleDebugtraceRenderer();
                break;
        }
        (new PrintExceptionHandler($renderer))->handleException($e);
    }
366643
public function report(Exception $e)
    {
        if ($this->shouldntReport($e)) {
            return;
        }

        try {
            $logger = $this->container->make(LoggerInterface::class);
        } catch (Exception $ex) {
            throw $e;
        }

        $level = $this->getLevel($e);
        $id = $this->container->make(ExceptionIdentifier::class)->identify($e);

        $logger->$level($e, ['identification' => ['id' => $id]]);
    }
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) {
            //
        }
    }
546259
protected function renderException($request, Exception $e)
    {
        return $this->app[Handler::class]->render($request, $e);
    }
342821
public function render()
    {
        $args = func_get_args();

        foreach ($args as $arg) {
            if(isset($this->output[$arg])) {
                return $this->output[$arg];
            }

            throw new Exception("{$arg} is not set!", 1);
        }
    }
1218802
public static function displayException(\Exception $e)
    {
        $cli = Cli::isCli();
        if ($cli) {
            $err  = '-> Exception: ' . $e->getMessage() . "\n";
            $err .= '   ' . $e->getFile() . ' (' . $e->getLine() . ")\n";
            foreach ($e->getTrace() as $key => $item) {
                if (isset($item['file']) && $item['file']) {
                    $err .= '   ' . trim($item['file']) . ' (' . $item['line'] . '): ' . $item['function'] . "()\n";
                }
            }
            echo $err;
        } else {
            $html = '<div class="box box-danger"><div class="box-header with-border"><h3 class="box-title">Exception détectée via le error handler</h3>'
                  . '</div><div class="box-body"><div class="panel panel-danger"><div class="panel-body">'
                  . self::buildErrorLink($e->getFile(), $e->getLine()) . ': <strong>' . $e->getMessage() . '</strong></div>';
            $html .= '<table class="table table-bordered"><tr><th style="width: 10px">#</th><th>Fichier</th><th>Fonction</th></tr>';
            foreach ($e->getTrace() as $key => $item) {
                $html .= '<tr><td>' . ($key + 1) . '</td><td>' . @self::buildErrorLink($item['file'], $item['line']) 
                      .  '</td><td>' . htmlspecialchars($item['function']) . '()</td></tr>';
            }
            $html .= '</table></div></div>';
            //Container::getResponse()->appendBody($html);
            echo $html;
        }
    }