Пример #1
0
    def __init__(self, status, msg):
        supermsg = 'Memcached error #' + repr(status)
        if msg:
            supermsg += ":  " + msg
        Exception.__init__(self, supermsg)

        self.status = status
        self.msg = msg
Пример #2
0
 def __init__(self, error, status, code=400, headers=None):
     Exception.__init__(self)
     if not isinstance(error, list):
         self.errors = [str(error)]
     else:
         self.errors = error
     self.code = code
     self.status = status
     self.headers = headers
 def __init__(self, error_code, attach_value=''):
     attach_value = '' if attach_value == '' else ' (定位值:%s)' % attach_value
     obj = t_sys_error_code.objects.filter(error_code=error_code)
     if obj.count() > 0:
         err = obj[0].error_text + attach_value
         Exception.__init__(self, err)
         self.todo = obj[0].possible_reason
     else:
         err = u'未知异常::>_<:: ' + attach_value
         Exception.__init__(self, err)
         self.todo = u'请维护error_code:%s' % error_code
Пример #4
0
    def __init__(self, message, traceback=None):
        """
        Constructor

        :type message: str
        :param message: Exception explanations

        :type traceback: str
        :param traceback: String representation of exception traceback.
        """
        Exception.__init__(self, message)
        self.__traceback = traceback
    def __init__(self, generic_error_msg, specific_msg=None):
        """
        Initializes this instance.

        :type generic_error_msg: str
        :param generic_error_msg: this object's generic error message.
        :type specific_msg: str
        :param specific_msg: specific additional error message.
            Optional parameter, defaults to C{None}.
        """
        Exception.__init__(self)
        self.__generic_error_msg = generic_error_msg
        self.__specific_msg = specific_msg

        self._error_code = None
        self._error_msg = self.get_error_message()
Пример #6
0
  def __init__(self, **kwargs):
    """
    DBS exception can be initialized in following ways:
      DBSException(args=exceptionString)
      DBSException(exception=exceptionObject)      
    """ 
    args = kwargs.get("args", "")
    ex = kwargs.get("exception", None)
    if ex != None:
      if isinstance(ex, Exception):
	 exArgs = "%s" % (ex)
	 if args == "":
	   args = exArgs
	 else:
	   args = "%s (%s)" % (args, exArgs)
    Exception.__init__(self, args)
Пример #7
0
    def __init__(self, **kwargs):
        """
    DBS exception can be initialized in following ways:
      DBSException(args=exceptionString)
      DBSException(exception=exceptionObject)      
    """

        args = kwargs.get("args", "")
        ex = kwargs.get("exception", None)
        self.code = kwargs.get("code", "")

        if ex != None:
            if isinstance(ex, Exception):
                exArgs = "%s" % (ex)
                if args == "":
                    args = exArgs
                else:
                    args = "%s (%s)" % (args, exArgs)
        #print args
        Exception.__init__(self, args)
Пример #8
0
 def __init__(self, rv, *args):
     self.rv = rv
     Exc.__init__(self, *args)
Пример #9
0
 def __init__(self, mixture):
     self.mixture = mixture
     Exception.__init__(self)
	def __init__(self, message):
		""" Initialize module """
		Exception.__init__(self)
		self.message = message
	def __init__(self, msg):
		Exception.__init__(self, msg)
Пример #12
0
 def __init__(self, extent):
     Exception.__init__(self)
     self.message = "Could not use: {0} as extent".format(extent)
Пример #13
0
 def __init__(self, sofar, numpreds, succs):
     Exception.__init__(self, "cycle in constraints", sofar, numpreds, succs)
     self.preds = None
Пример #14
0
 def __init__(self, filename):
   Exception.__init__(self, 'square bracket not match "%s"' % filename)
Пример #15
0
 def __init__(self, filename):
   Exception.__init__(self, 'round bracket not match, "%s"' % filename)
Пример #16
0
 def __init__(self, name, referer=None):
   if referer != None:
     Exception.__init__(self, 'Module not found "%s", referer "%s"' %
         (name, referer))
   else:
     Exception.__init__(self, 'Module not found "%s"' % name)
Пример #17
0
 def __init__(self, message, processdict=None):
     Exception.__init__(self, message)
     self.classname = "Spotfinder Problem"
     self.parameters = processdict
Пример #18
0
 def __init__(self, msg, *args, **kwargs):
     Exception.__init__(self, *args, **kwargs)
     self.msg = msg
Пример #19
0
 def __init__(self, sofar, numpreds, succs):
     Exception.__init__(self, "cycle in constraints", sofar, numpreds,
                        succs)
     self.preds = None
Пример #20
0
 def __init__(msg):
     Exception.__init__(msg)
Пример #21
0
 def __init__(self, filename):
   Exception.__init__(self, 'curly bracket not match "%s"' % filename)
Пример #22
0
 def __init__(self,mixture):
     self.mixture = mixture
     Exception.__init__(self)
Пример #23
0
 def __init__(self, path):
   Exception.__init__(self, 'Path not found, %s', path)
Пример #24
0
 def __init__(self, err='Natrix BaseException'):
     Exception.__init__(self, err)
Пример #25
0
 def __init__(self, layers, behavior, trim):
     Exception.__init__(self)
     self.message = (
         "Could not create a spatial finder with layers: {0}, "
         "behavior {1} and trim value {2}").format(layers, behavior, trim)
Пример #26
0
 def __init__(self, message, status_code):
     Exception.__init__(self)
     self.message = message
     self.status_code = status_code
 def __init__(self, message):
     """ Initialize module """
     Exception.__init__(self)
     self.message = message
Пример #28
0
 def __init__(self, message, innerException=None):
     Exception.__init__(self)
     self.message = message
     self.innerException = innerException
Пример #29
0
 def __init__(self, struct, varname):
     self.struct = struct
     self.varname = varname
     Exception.__init__(self)
Пример #30
0
 def __init__(self, msg, widget = None):
   Exception.__init__(self, msg)
   self.widget = widget
Пример #31
0
 def __init__(self, insee_code, year):
     message = "The commune with insee code %s was removed in %s"%(insee_code, year)
     Exception.__init__(self, message)
Пример #32
0
 def __init__(self, message, innerException = None):
     Exception.__init__(self)
     self.message = message
     self.innerException = innerException
Пример #33
0
 def __init__(self, insee_code):
     message = "This commune with insee code %s has not been imported yet"%(insee_code)
     Exception.__init__(self, message)
Пример #34
0
 def __init__(self, old_insee_code, new_insee_code):
     message = "Insee code of this commune was change from %s to %s"%(old_insee_code, new_insee_code)
     Exception.__init__(self, message)
Пример #35
0
 def __init__(self, *args, **keywords):
     Exception.__init__(self, *args)
     self.keywords = keywords
     self._print_exc_str = None
Пример #36
0
    def __init__(self, msg, variableValue):
        Exception.__init__(self, msg)

        self.variableValue = variableValue
Пример #37
0
 def __init__(self):
     Exception.__init__(self)
Пример #38
0
 def __init__(msg):
     Exception.__init__(msg)
Пример #39
0
 def __init__(self, errStr = ''):
     Exception.__init__(self)
     self.errStr = errStr
Пример #40
0
 def __init__(self, value=None):
     Exception.__init__(self)
     self.value = value
Пример #41
0
 def __init__(self,message,processdict=None):
   Exception.__init__(self,message)
   self.classname="Spotfinder Problem"
   self.parameters = processdict
Пример #42
0
 def __init__(self, msg):
     Exception.__init__(self, msg)
Пример #43
0
    def __init__(self, msg, variableValue):
        Exception.__init__(self, msg)

        self.variableValue = variableValue
Пример #44
0
 def __init__(self,struct,varname):
     self.struct = struct
     self.varname = varname
     Exception.__init__(self)
	def __init__(self, message):
		Exception.__init__(self)
		self.message = message
Пример #46
0
 def __init__(self, msg, *args, **kwargs):
     Exception.__init__(self, *args, **kwargs)
     self.msg = msg
Пример #47
0
 def __init__(self, a_behavior):
     Exception.__init__(self)
     self.message = "Could not instantiate behavior {0}".format(a_behavior)