src/Zicht/Bundle/FrameworkExtraBundle/Command/AbstractCronCommand.php
public function errorHandler($errno, $errstr, $file, $line)
    {
        switch ($errno) {
            case E_USER_ERROR:
            case E_ERROR:
            case E_RECOVERABLE_ERROR:
                $this->logger->addError($errstr, array($file, $line));
                exit();
                break;
            case E_WARNING:
            case E_USER_WARNING:
                $this->logger->addWarning($errstr, array($file, $line));
                break;
            default:
                $this->logger->addInfo($errstr, array($file, $line));
                break;
        }
    }
public function errorHandler($errno, $errstr, $file, $line)
    {
        switch ($errno) {
            case E_USER_ERROR:
            case E_ERROR:
            case E_RECOVERABLE_ERROR:
                $this->logger->addError($errstr, array($file, $line));
                exit();
                break;
            case E_WARNING:
            case E_USER_WARNING:
                $this->logger->addWarning($errstr, array($file, $line));
                break;
            default:
                $this->logger->addInfo($errstr, array($file, $line));
                break;
        }
    }
public function errorHandler ( $ errno , $ errstr , $ file , $ line ) { switch ( $ errno ) { case E_USER_ERROR : case E_ERROR : case E_RECOVERABLE_ERROR : $ this -> logger -> addError ( $ errstr , array ( $ file , $ line ) ) ; exit ( ) ; break ; case E_WARNING : case E_USER_WARNING : $ this -> logger -> addWarning ( $ errstr , array ( $ file , $ line ) ) ; break ; default : $ this -> logger -> addInfo ( $ errstr , array ( $ file , $ line ) ) ; break ; } }
Error handler; will log the error and exit the script.

@param int $errno
@param string $errstr
@param string $file
@param int $line
@return void
Error handler ; will log the error and exit the script .