cakephp / 4.4 / class-cake.error.renderer.consoleerrorrenderer.html

Class ConsoleErrorRenderer

Plain text error rendering with a stack trace.

Writes to STDERR via a Cake\Console\ConsoleOutput instance for console environments

Property Summary

  • $output protected
    Cake\Console\ConsoleOutput
  • $trace protected
    bool

Method Summary

  • __construct() public

    Constructor.

  • render() public

    Render output for the provided error.

  • write() public

    Write output to the renderer's output stream

Method Detail

__construct() public

__construct(array $config)

Constructor.

Options

  • stderr - The ConsoleOutput instance to use. Defaults to php://stderr
  • trace - Whether or not stacktraces should be output.

Parameters

array $config

Error handling configuration.

render() public

render(Cake\Error\PhpError $error, bool $debug): string

Render output for the provided error.

Parameters

Cake\Error\PhpError $error
bool $debug

Returns

string

write() public

write(string $out): void

Write output to the renderer's output stream

Parameters

string $out

Returns

void

Property Detail

$output protected

Type

Cake\Console\ConsoleOutput

$trace protected

Type

bool

© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Error.Renderer.ConsoleErrorRenderer.html