コード例 #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
ファイル: error.py プロジェクト: gnu-user/sugar-nanny
 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
コード例 #3
0
 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
ファイル: dbsException.py プロジェクト: bbockelm/DBS
  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
ファイル: dbsException.py プロジェクト: dmwm/DBSAPI
    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
ファイル: cli.py プロジェクト: hflynn/openmicroscopy
 def __init__(self, rv, *args):
     self.rv = rv
     Exc.__init__(self, *args)
コード例 #9
0
 def __init__(self, mixture):
     self.mixture = mixture
     Exception.__init__(self)
コード例 #10
0
	def __init__(self, message):
		""" Initialize module """
		Exception.__init__(self)
		self.message = message
コード例 #11
0
	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
ファイル: exception.py プロジェクト: zhuligs/cctbx_project
 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
ファイル: CentOSVZAdapter.py プロジェクト: sksamal/ovpl
 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
ファイル: exception.py プロジェクト: rsirimalla/LoginDetect
 def __init__(self, message, status_code):
     Exception.__init__(self)
     self.message = message
     self.status_code = status_code
コード例 #27
0
 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
ファイル: models.py プロジェクト: fmassot/mapsdata
 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
ファイル: models.py プロジェクト: fmassot/mapsdata
 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
ファイル: models.py プロジェクト: fmassot/mapsdata
 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
ファイル: megatron.py プロジェクト: ed-aicradle/monotone
 def __init__(self, *args, **keywords):
     Exception.__init__(self, *args)
     self.keywords = keywords
     self._print_exc_str = None
コード例 #36
0
ファイル: valueParsingError.py プロジェクト: danrg/RGT-tool
    def __init__(self, msg, variableValue):
        Exception.__init__(self, msg)

        self.variableValue = variableValue
コード例 #37
0
ファイル: myexception.py プロジェクト: dading/iphone_order
 def __init__(self):
     Exception.__init__(self)
コード例 #38
0
 def __init__(msg):
     Exception.__init__(msg)
コード例 #39
0
ファイル: myexception.py プロジェクト: dading/iphone_order
 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
ファイル: exception.py プロジェクト: cctbx/cctbx-playground
 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
ファイル: valueParsingError.py プロジェクト: abap/RGT-tool
    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)
コード例 #45
0
	def __init__(self, message):
		Exception.__init__(self)
		self.message = message
コード例 #46
0
ファイル: __init__.py プロジェクト: peteristhegreat/ioHub
 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)