Closed ljyf5593 closed 10 years ago
@ljyf5593 thanks - the change looks good to me, but 3.3/master is only for releases.
Could you please:
Thanks very much
@ljyf5593 @acoulton I might be looking at the wrong place, but as far as I can see Kohana_Exception::_handler($e) has an HTTP-centric try{}, setting a header, the later echoing. Which we don't want at all in CLI.
I think what you want is the single call to "Kohana_Exception::log($e);" instead of "_handler", because its already inside a try{} in Minion_Exception anyways?...
/**
* Exception handler, logs the exception and generates a Response object
* for display.
*
* @uses Kohana_Exception::response
* @param Exception $e
* @return Response
*/
public static function _handler(Exception $e)
{
try
{
// Log the exception
Kohana_Exception::log($e);
// Generate the response
$response = Kohana_Exception::response($e);
return $response;
}
catch (Exception $e)
{
/**
* Things are going *really* badly for us, We now have no choice
* but to bail. Hard.
*/
// Clean the output buffer if one exists
ob_get_level() AND ob_clean();
// Set the Status code to 500, and Content-Type to text/plain.
header('Content-Type: text/plain; charset='.Kohana::$charset, TRUE, 500);
echo Kohana_Exception::text($e);
exit(1);
}
}
@cyrgit yes, you are right. thank you ! had create a new pull request
Closed by #106
log the error, maybe someone conn't see the error on the screen