src/Viserio/Component/Exception/Console/Handler.php
private function renderEditor(ConsoleOutputContract $output, Throwable $exception): void
    {
        $output->writeln(\sprintf(
            'at <fg=green>%s</>' . ':<fg=green>%s</>',
            $exception->getFile(),
            $exception->getLine()
        ));

        $range = self::getFileLines(
            $exception->getFile(),
            $exception->getLine() - 5,
            10
        );

        foreach ($range as $k => $code) {
            $line = $k + 1;
            $code = $exception->getLine() === $line ? \sprintf('<bg=red>%s</>', $code) : $code;
            $output->writeln(\sprintf('%s: %s', $line, $code));
        }

        $output->writeln('');
    }
private function renderEditor(ConsoleOutputContract $output, Throwable $exception): void
    {
        $output->writeln(\sprintf(
            'at <fg=green>%s</>' . ':<fg=green>%s</>',
            $exception->getFile(),
            $exception->getLine()
        ));

        $range = self::getFileLines(
            $exception->getFile(),
            $exception->getLine() - 5,
            10
        );

        foreach ($range as $k => $code) {
            $line = $k + 1;
            $code = $exception->getLine() === $line ? \sprintf('<bg=red>%s</>', $code) : $code;
            $output->writeln(\sprintf('%s: %s', $line, $code));
        }

        $output->writeln('');
    }
Renders the editor containing the code that was the
origin of the exception.

@param \Viserio\Component\Contract\Exception\ConsoleOutput $output
@param \Throwable                                          $exception

@return void