+class InvalidRSpecElement(SfaFault):
+ def __init__(self, value, extra = None):
+ self.value = value
+ faultString = "Invalid RSpec Element: %(value)s" % locals()
+ SfaFault.__init__(self, GENICODE.ERROR, faultString, extra)
+ def __str__(self):
+ return repr(self.value)
+
+class InvalidXML(SfaFault):
+ def __init__(self, value, extra = None):
+ self.value = value
+ faultString = "Invalid XML Document: %(value)s" % locals()
+ SfaFault.__init__(self, GENICODE.BADARGS, faultString, extra)
+ def __str__(self):
+ return repr(self.value)
+
+class AccountNotEnabled(SfaFault):
+ def __init__(self, extra = None):
+ faultString = "Account Disabled"
+ SfaFault.__init__(self, GENICODE.ERROR, faultString, extra)
+ def __str__(self):
+ return repr(self.value)
+
+class CredentialNotVerifiable(SfaFault):
+ def __init__(self, value=None, extra = None):
+ self.value = value
+ faultString = "Unable to verify credential" %locals()
+ if value:
+ faultString += ": %s" % value
+ faultString += ", "
+ SfaFault.__init__(self, GENICODE.BADARGS, faultString, extra)
+ def __str__(self):
+ return repr(self.value)
+
+class CertExpired(SfaFault):
+ def __init__(self, value, extra=None):
+ self.value = value
+ faultString = "%s cert is expired" % value
+ SfaFault.__init__(self, GENICODE.ERROR, faultString, extra)
+
+class SfatablesRejected(SfaFault):
+ def __init__(self, value, extra=None):
+ self.value =value
+ faultString = "%s rejected by sfatables"
+ SfaFault.__init__(self, GENICODE.FORBIDDEN, faultString, extra)
+
+class UnsupportedOperation(SfaFault):
+ def __init__(self, value, extra=None):
+ self.value = value
+ faultString = "Unsupported operation: %s" % value
+ SfaFault.__init__(self, GENICODE.UNSUPPORTED, faultString, extra)
+