Ergo\Error\ConsoleErrorHandler::handle PHP Method

handle() public method

* (non-phpdoc)
See also: ErrorHandler::handle()
public handle ( $e )
    public function handle($e)
    {
        $this->logException($e);
        if ($this->isExceptionHalting($e)) {
            if (ob_get_contents() !== false) {
                ob_end_flush();
            }
            if ($this->_showStackTrace) {
                echo "\n" . $e->__toString() . "\n\n";
            }
            exit(self::EXIT_CODE);
        }
    }

Usage Example

Ejemplo n.º 1
0
 public function handle($e)
 {
     if ($this->isExceptionHalting($e)) {
         $this->logger()->error("worker terminated with a fatal error, releasing task for %d seconds", self::RELEASE_DELAY);
         try {
             $this->_queue->release($this->_task, self::RELEASE_DELAY);
         } catch (Exception $re) {
             $this->logger()->error($re->getMessage(), array('exception' => $re));
         }
     }
     parent::handle($e);
 }
ConsoleErrorHandler