protected function handleError(Exception $e)
    {
        if($this->isCli){
            $errorCode = $e->getCode();
            exit((empty($errorCode)) ? 1 : $errorCode);	//exit the program with an error
        }
        else {
            throw new Exception($e->getMessage());
        }
    }
protected function handleError(Exception $e)
    {
        if($this->isCli){
            $errorCode = $e->getCode();
            exit((empty($errorCode)) ? 1 : $errorCode);	//exit the program with an error
        }
        else {
            throw new Exception($e->getMessage());
        }
    }
protected function handleError ( Exception $ e ) { if ( $ this -> isCli ) { $ errorCode = $ e -> getCode ( ) ; exit ( ( empty ( $ errorCode ) ) ? 1 : $ errorCode ) ; //exit the program with an error
 } else { throw new Exception ( $ e -> getMessage ( ) ) ; } }
Handles a fatal error situation.

@param Exception $e

@throws Exception
Handles a fatal error situation .