Did I find the right examples for you? yes no

All Samples(4733)  |  Call(3807)  |  Derive(926)  |  Import(0)
Common base class for all exceptions

src/m/o/modern-python-example-HEAD/lib/python2.7/site-packages/logilab/common/proc.py   modern-python-example(Download)
    class ResourceError(BaseException):
        """Error raise when resource limit is reached"""
        limit = "Unknown Resource Limit"
except NameError:
    class ResourceError(Exception):

src/p/y/pyjs-HEAD/examples/libtest/ExceptionTest.py   pyjs(Download)
    def testStrReprSingleArg(self):
        args = ('test',)
 
        e = BaseException(*args)
        self.assertEqual(e.args[0], args[0])

src/s/c/scalpel-HEAD/lib/gravity/tae/match/distance_matrix.py   scalpel(Download)
            # unexpected situation. calculation has to be performed from 
            # upper row to lower row 
            elif row < row_start: raise BaseException("Wrong calculation order")
 
            rowdata[row - row_start + 1] = num
                data[index] = start_row = row
            elif row < start_row: 
                raise BaseException("Invalid calculation order: ", start_row, row, col)
 
            data[index + 1 + row - start_row] = num

src/s/c/scalarizr-HEAD/src/scalarizr/util/__init__.py   scalarizr(Download)
class UtilError(BaseException):
    pass
 
 
class LocalObject:
class PopenError(BaseException):
 
    def __str__(self):
        if len(self.args) >= 5:
            args = [self.error_text + '. ' if self.error_text else '']
            msg += 'Timeout: %d seconds reached' % (timeout, )
            if raise_exc:
                raise BaseException(msg)
            else:
                return False
    def add_task(self, fn, interval, title=None):
        self._lock.acquire()
        try:
            if fn in self._tasks:
                raise BaseException('Task %s already registered in executor with an interval %s minutes', 

src/e/d/edna-HEAD/mxPluginExec/plugins/EDPluginGroupISPyB-v1.4/plugins/XSDataISPyBv1_4.py   edna(Download)
        else:
            strMessage = "ERROR! AutoProcScalingContainer constructor argument 'AutoProcScaling' is not AutoProcScaling but %s" % self._AutoProcScaling.__class__.__name__
            raise BaseException(strMessage)
        if AutoProcScalingStatistics is None:
            self._AutoProcScalingStatistics = []
        elif AutoProcScalingStatistics.__class__.__name__ == "list":
            self._AutoProcScalingStatistics = AutoProcScalingStatistics
        else:
            strMessage = "ERROR! AutoProcScalingContainer constructor argument 'AutoProcScalingStatistics' is not list but %s" % self._AutoProcScalingStatistics.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! AutoProcScalingContainer constructor argument 'AutoProcIntegrationContainer' is not AutoProcIntegrationContainer but %s" % self._AutoProcIntegrationContainer.__class__.__name__
            raise BaseException(strMessage)
    # Methods and properties for the 'AutoProcScaling' attribute
    def getAutoProcScaling(self): return self._AutoProcScaling
        else:
            strMessage = "ERROR! AutoProcScalingContainer.setAutoProcScaling argument is not AutoProcScaling but %s" % AutoProcScaling.__class__.__name__
            raise BaseException(strMessage)
    def delAutoProcScaling(self): self._AutoProcScaling = None
    AutoProcScaling = property(getAutoProcScaling, setAutoProcScaling, delAutoProcScaling, "Property for AutoProcScaling")
        else:
            strMessage = "ERROR! AutoProcScalingContainer.setAutoProcScalingStatistics argument is not list but %s" % AutoProcScalingStatistics.__class__.__name__
            raise BaseException(strMessage)
    def delAutoProcScalingStatistics(self): self._AutoProcScalingStatistics = None
    AutoProcScalingStatistics = property(getAutoProcScalingStatistics, setAutoProcScalingStatistics, delAutoProcScalingStatistics, "Property for AutoProcScalingStatistics")

src/e/d/edna-HEAD/mxPluginExec/plugins/EDPluginGroupAutoproc/plugins/XSDataAutoproc.py   edna(Download)
        else:
            strMessage = "ERROR! XSData2DCoordinates constructor argument 'x' is not XSDataFloat but %s" % self._x.__class__.__name__
            raise BaseException(strMessage)
        if y is None:
            self._y = None
        elif y.__class__.__name__ == "XSDataFloat":
            self._y = y
        else:
            strMessage = "ERROR! XSData2DCoordinates constructor argument 'y' is not XSDataFloat but %s" % self._y.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! XSData2DCoordinates.setX argument is not XSDataFloat but %s" % x.__class__.__name__
            raise BaseException(strMessage)
    def delX(self): self._x = None
    x = property(getX, setX, delX, "Property for x")
        else:
            strMessage = "ERROR! XSData2DCoordinates.setY argument is not XSDataFloat but %s" % y.__class__.__name__
            raise BaseException(strMessage)
    def delY(self): self._y = None
    y = property(getY, setY, delY, "Property for y")
        else:
            strMessage = "ERROR! XSDataXdsCompletenessEntry constructor argument 'outer_res' is not XSDataFloat but %s" % self._outer_res.__class__.__name__
            raise BaseException(strMessage)
        if outer_observed is None:
            self._outer_observed = None

src/e/d/edna-HEAD/mxv1/src/XSDataMXv1.py   edna(Download)
        else:
            strMessage = "ERROR! XSDataStatisticsIntegrationAverageAndNumberOfReflections constructor argument 'averageIOverSigma' is not XSDataDouble but %s" % self._averageIOverSigma.__class__.__name__
            raise BaseException(strMessage)
        if averageIntensity is None:
            self._averageIntensity = None
        elif averageIntensity.__class__.__name__ == "XSDataDouble":
            self._averageIntensity = averageIntensity
        else:
            strMessage = "ERROR! XSDataStatisticsIntegrationAverageAndNumberOfReflections constructor argument 'averageIntensity' is not XSDataDouble but %s" % self._averageIntensity.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! XSDataStatisticsIntegrationAverageAndNumberOfReflections constructor argument 'averageSigma' is not XSDataDouble but %s" % self._averageSigma.__class__.__name__
            raise BaseException(strMessage)
        if numberOfReflections is None:
            self._numberOfReflections = None
        elif numberOfReflections.__class__.__name__ == "XSDataInteger":
            self._numberOfReflections = numberOfReflections
        else:
            strMessage = "ERROR! XSDataStatisticsIntegrationAverageAndNumberOfReflections constructor argument 'numberOfReflections' is not XSDataInteger but %s" % self._numberOfReflections.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! XSDataStatisticsIntegrationAverageAndNumberOfReflections.setAverageIOverSigma argument is not XSDataDouble but %s" % averageIOverSigma.__class__.__name__
            raise BaseException(strMessage)
    def delAverageIOverSigma(self): self._averageIOverSigma = None
    averageIOverSigma = property(getAverageIOverSigma, setAverageIOverSigma, delAverageIOverSigma, "Property for averageIOverSigma")

src/e/d/edna-HEAD/bioSaxsv1/src/XSDataBioSaxsv1_0.py   edna(Download)
        else:
            strMessage = "ERROR! XSDataBioSaxsExperimentSetup constructor argument 'detector' is not XSDataString but %s" % self._detector.__class__.__name__
            raise BaseException(strMessage)
        if detectorDistance is None:
            self._detectorDistance = None
        elif detectorDistance.__class__.__name__ == "XSDataLength":
            self._detectorDistance = detectorDistance
        else:
            strMessage = "ERROR! XSDataBioSaxsExperimentSetup constructor argument 'detectorDistance' is not XSDataLength but %s" % self._detectorDistance.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! XSDataBioSaxsExperimentSetup constructor argument 'pixelSize_1' is not XSDataLength but %s" % self._pixelSize_1.__class__.__name__
            raise BaseException(strMessage)
        if pixelSize_2 is None:
            self._pixelSize_2 = None
        elif pixelSize_2.__class__.__name__ == "XSDataLength":
            self._pixelSize_2 = pixelSize_2
        else:
            strMessage = "ERROR! XSDataBioSaxsExperimentSetup constructor argument 'pixelSize_2' is not XSDataLength but %s" % self._pixelSize_2.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! XSDataBioSaxsExperimentSetup constructor argument 'beamCenter_1' is not XSDataDouble but %s" % self._beamCenter_1.__class__.__name__
            raise BaseException(strMessage)
        if beamCenter_2 is None:
            self._beamCenter_2 = None

src/e/d/edna-HEAD/mxv2/src/XSDataMXv2.py   edna(Download)
        else:
            strMessage = "ERROR! kappa_alignment_response constructor argument 'status' is not status but %s" % self._status.__class__.__name__
            raise BaseException(strMessage)
        self._comment = str(comment)
        if possible_orientation is None:
        else:
            strMessage = "ERROR! kappa_alignment_response constructor argument 'possible_orientation' is not list but %s" % self._possible_orientation.__class__.__name__
            raise BaseException(strMessage)
    # Methods and properties for the 'status' attribute
    def getStatus(self): return self._status
        else:
            strMessage = "ERROR! kappa_alignment_response.setStatus argument is not status but %s" % status.__class__.__name__
            raise BaseException(strMessage)
    def delStatus(self): self._status = None
    status = property(getStatus, setStatus, delStatus, "Property for status")
        else:
            strMessage = "ERROR! kappa_alignment_response.setPossible_orientation argument is not list but %s" % possible_orientation.__class__.__name__
            raise BaseException(strMessage)
    def delPossible_orientation(self): self._possible_orientation = None
    possible_orientation = property(getPossible_orientation, setPossible_orientation, delPossible_orientation, "Property for possible_orientation")
    def addPossible_orientation(self, value):
        if value is None:
            strMessage = "ERROR! kappa_alignment_response.addPossible_orientation argument is None"
            raise BaseException(strMessage)            

src/e/d/edna-HEAD/mxPluginExec/plugins/EDPluginBest-v1.2/plugins/XSDataBestv1_2.py   edna(Download)
        else:
            strMessage = "ERROR! XSDataBestCollectionRun constructor argument 'action' is not XSDataString but %s" % self._action.__class__.__name__
            raise BaseException(strMessage)
        if collectionRunNumber is None:
            self._collectionRunNumber = None
        elif collectionRunNumber.__class__.__name__ == "XSDataInteger":
            self._collectionRunNumber = collectionRunNumber
        else:
            strMessage = "ERROR! XSDataBestCollectionRun constructor argument 'collectionRunNumber' is not XSDataInteger but %s" % self._collectionRunNumber.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! XSDataBestCollectionRun constructor argument 'crystalPosition' is not XSDataInteger but %s" % self._crystalPosition.__class__.__name__
            raise BaseException(strMessage)
        if exposureTime is None:
            self._exposureTime = None
        elif exposureTime.__class__.__name__ == "XSDataTime":
            self._exposureTime = exposureTime
        else:
            strMessage = "ERROR! XSDataBestCollectionRun constructor argument 'exposureTime' is not XSDataTime but %s" % self._exposureTime.__class__.__name__
            raise BaseException(strMessage)
        else:
            strMessage = "ERROR! XSDataBestCollectionRun constructor argument 'numberOfImages' is not XSDataInteger but %s" % self._numberOfImages.__class__.__name__
            raise BaseException(strMessage)
        if overlaps is None:
            self._overlaps = None

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next