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
文件: topsort.py 项目: Shuyib/galaxy
 def __init__(self, sofar, numpreds, succs):
     Exception.__init__(self, "cycle in constraints", sofar, numpreds, succs)
     self.preds = None
示例#14
0
文件: errors.py 项目: hzx/pymutant
 def __init__(self, filename):
   Exception.__init__(self, 'square bracket not match "%s"' % filename)
示例#15
0
文件: errors.py 项目: hzx/pymutant
 def __init__(self, filename):
   Exception.__init__(self, 'round bracket not match, "%s"' % filename)
示例#16
0
文件: errors.py 项目: hzx/pymutant
 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
文件: __init__.py 项目: sckim/ioHub
 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
文件: errors.py 项目: hzx/pymutant
 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
文件: errors.py 项目: hzx/pymutant
 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
文件: common.py 项目: oispuu/DSHWI
 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)