Skip to content

[ExceptionRender] - Outputting web exceptions in CLI #130

Description

@cnizzardini

What Happened

Web exceptions (html) output to CLI when an exception is encountered running a command.

Expected Behavior

CLI exceptions are displayed.

Steps to Reproduce

  1. Throw an exception in a cake command

Proposed change:

    public function render(): ResponseInterface
    {
        if (PHP_SAPI === 'cli') {
            $request = $request ?? Router::getRequest();
            return (new ConsoleExceptionRenderer($this->error, $request, $this->_config))->render();
        }
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions