Пример #1
0
 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
Пример #2
0
 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
Пример #3
0
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
Пример #4
0
 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
Пример #5
0
 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