def validate(self, value): try: s = int(value) if s < min or s > max: raise SettingsException('out of bounds') except Exception, e: raise SettingsException(e.message)
def validate(self, value): """ @raise SettingsException: On validation failure """ try: if not self.arg1: self.validatorMethod(value) else: self.validatorMethod(value, self.arg1) except Exception, ex: raise SettingsException(str(ex))
def validate(self, value): """ @raise SettingsException: On validation failure """ raise SettingsException("%s : %s" % (self.errorMessage, value))