def _fail(self, value, contextinfo=None, srcexception=None, errcondition=None): """Wrapper to raise (and log) DAVError.""" e = DAVError(value, contextinfo, srcexception, errcondition) if self._verbose >= 2: print("Raising DAVError %s" % safeReEncode(e.getUserInfo(), sys.stdout.encoding or "ASCII"), file=sys.stdout) raise e
def _fail(self, value, contextinfo=None, srcexception=None, errcondition=None): """Wrapper to raise (and log) DAVError.""" e = DAVError(value, contextinfo, srcexception, errcondition) if self._verbose >= 2: _logger.error("Raising DAVError {}".format( safeReEncode(e.getUserInfo(), sys.stdout.encoding))) raise e
def fail(value, contextinfo=None, srcexception=None, errcondition=None): """Wrapper to raise (and log) DAVError.""" if isinstance(value, Exception): e = asDAVError(value) else: e = DAVError(value, contextinfo, srcexception, errcondition) log("Raising DAVError %s" % e.getUserInfo()) raise e
def _fail(self, value, contextinfo=None, srcexception=None, errcondition=None): """Wrapper to raise (and log) DAVError.""" e = DAVError(value, contextinfo, srcexception, errcondition) if self._verbose >= 2: print >> sys.stdout, "Raising DAVError %s" % e.getUserInfo() raise e
def _fail(self, value, contextinfo=None, srcexception=None, errcondition=None): """Wrapper to raise (and log) DAVError.""" e = DAVError(value, contextinfo, srcexception, errcondition) if self._verbose >= 2: print >>sys.stdout, "Raising DAVError %s" % e.getUserInfo() raise e