def __init__(self, status, msg): supermsg = 'Memcached error #' + repr(status) if msg: supermsg += ": " + msg Exception.__init__(self, supermsg) self.status = status self.msg = msg
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
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()
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)
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)
def __init__(self, rv, *args): self.rv = rv Exc.__init__(self, *args)
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)
def __init__(self, extent): Exception.__init__(self) self.message = "Could not use: {0} as extent".format(extent)
def __init__(self, sofar, numpreds, succs): Exception.__init__(self, "cycle in constraints", sofar, numpreds, succs) self.preds = None
def __init__(self, filename): Exception.__init__(self, 'square bracket not match "%s"' % filename)
def __init__(self, filename): Exception.__init__(self, 'round bracket not match, "%s"' % filename)
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)
def __init__(self, message, processdict=None): Exception.__init__(self, message) self.classname = "Spotfinder Problem" self.parameters = processdict
def __init__(self, msg, *args, **kwargs): Exception.__init__(self, *args, **kwargs) self.msg = msg
def __init__(self, sofar, numpreds, succs): Exception.__init__(self, "cycle in constraints", sofar, numpreds, succs) self.preds = None
def __init__(msg): Exception.__init__(msg)
def __init__(self, filename): Exception.__init__(self, 'curly bracket not match "%s"' % filename)
def __init__(self,mixture): self.mixture = mixture Exception.__init__(self)
def __init__(self, path): Exception.__init__(self, 'Path not found, %s', path)
def __init__(self, err='Natrix BaseException'): Exception.__init__(self, err)
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)
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
def __init__(self, message, innerException=None): Exception.__init__(self) self.message = message self.innerException = innerException
def __init__(self, struct, varname): self.struct = struct self.varname = varname Exception.__init__(self)
def __init__(self, msg, widget = None): Exception.__init__(self, msg) self.widget = widget
def __init__(self, insee_code, year): message = "The commune with insee code %s was removed in %s"%(insee_code, year) Exception.__init__(self, message)
def __init__(self, message, innerException = None): Exception.__init__(self) self.message = message self.innerException = innerException
def __init__(self, insee_code): message = "This commune with insee code %s has not been imported yet"%(insee_code) Exception.__init__(self, message)
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)
def __init__(self, *args, **keywords): Exception.__init__(self, *args) self.keywords = keywords self._print_exc_str = None
def __init__(self, msg, variableValue): Exception.__init__(self, msg) self.variableValue = variableValue
def __init__(self): Exception.__init__(self)
def __init__(msg): Exception.__init__(msg)
def __init__(self, errStr = ''): Exception.__init__(self) self.errStr = errStr
def __init__(self, value=None): Exception.__init__(self) self.value = value
def __init__(self,message,processdict=None): Exception.__init__(self,message) self.classname="Spotfinder Problem" self.parameters = processdict
def __init__(self, msg): Exception.__init__(self, msg)
def __init__(self, msg, variableValue): Exception.__init__(self, msg) self.variableValue = variableValue
def __init__(self,struct,varname): self.struct = struct self.varname = varname Exception.__init__(self)
def __init__(self, message): Exception.__init__(self) self.message = message
def __init__(self, msg, *args, **kwargs): Exception.__init__(self, *args, **kwargs) self.msg = msg
def __init__(self, a_behavior): Exception.__init__(self) self.message = "Could not instantiate behavior {0}".format(a_behavior)