$_options
$_options : array
Options for this instance.
Error Handler for Cake console. Does simple printing of the exception that occurred and the stack trace of the error.
Subclasses are required to implement the template methods to handle displaying the errors in their environment.
$_stderr : \Cake\Console\ConsoleOutput
Standard error stream.
handleError(integer $code, string $description, string|null $file = null, integer|null $line = null, array|null $context = null) : boolean
Set as the default error handler by CakePHP.
Use config/error.php to customize or replace this error handler. This function will use Debugger to display errors when debug > 0. And will log errors to Log, when debug == 0.
You can use the 'errorLevel' option to set what type of errors will be handled. Stack traces for errors can be enabled with the 'trace' option.
integer | $code | Code of error |
string | $description | Error description |
string|null | $file | File on which error occurred |
integer|null | $line | Line that triggered the error |
array|null | $context | Context |
True if error was handled
wrapAndHandleException(\Exception|\Error $exception) : void
Checks the passed exception type. If it is an instance of `Error` then, it wraps the passed object inside another Exception object for backwards compatibility purposes.
\Exception|\Error | $exception | The exception to handle |
handleException(\Exception $exception) : void
Handle errors in the console environment. Writes errors to stderr, and logs messages if Configure::read('debug') is false.
Uses a template method provided by subclasses to display errors in an environment appropriate way.
\Exception | $exception | Exception instance. |
When renderer class not found
handleFatalError(integer $code, string $description, string $file, integer $line) : boolean
Display/Log a fatal error.
integer | $code | Code of error |
string | $description | Error description |
string | $file | File on which error occurred |
integer | $line | Line that triggered the error |
_requestContext(\Cake\Http\ServerRequest $request) : string
Get the request context for an error/exception trace.
\Cake\Http\ServerRequest | $request | The request to read from. |
Loading…