Class ConsoleErrorHandler
Error Handler for Cake console. Does simple printing of the exception that occurred and the stack trace of the error.
		
		
		
		Package: Cake\Console
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/ConsoleErrorHandler.php
	
	Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/ConsoleErrorHandler.php
Properties summary
- 
			$stderrpublic staticStandard error stream.
Method Summary
- 
			_stop() protectedWrapper for exit(), used for testing.
- 
			getStderr() public staticGet the stderr object for the console error handling.
- 
			handleError() publicHandle errors in the console environment. Writes errors to stderr, and logs messages if Configure::read('debug') is 0. 
- 
			handleException() publicHandle a exception in the console environment. Prints a message to stderr.
Method Detail
_stop() protected ¶
_stop( integer $code = 0 )
Wrapper for exit(), used for testing.
Parameters
- integer $code optional 0
- The exit code.
handleError() public ¶
handleError( integer $code , string $description , string $file = null , integer $line = null , array $context = null )
Handle errors in the console environment. Writes errors to stderr, and logs messages if Configure::read('debug') is 0.
Parameters
- integer $code
- Error code
- string $description
- Description of the error.
- string $file optional null
- The file the error occurred in.
- integer $line optional null
- The line the error occurred on.
- array $context optional null
- The backtrace of the error.
handleException() public ¶
handleException( Exception $exception )
Handle a exception in the console environment. Prints a message to stderr.
Parameters
- Exception $exception
- The exception to handle
