summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-01-17 16:23:53 -0500
committerSimo Sorce <ssorce@redhat.com>2011-01-18 10:03:55 -0500
commit886e417fd76b25a28cde70be8de2851047ed0338 (patch)
tree3eeeae423ce3f9fb199dcf415f8143039af33eee /ipalib/errors.py
parentec3e7f1202935e4c82fd8b7c76a4d03d9ee6a19b (diff)
downloadfreeipa-886e417fd76b25a28cde70be8de2851047ed0338.tar.gz
freeipa-886e417fd76b25a28cde70be8de2851047ed0338.tar.xz
freeipa-886e417fd76b25a28cde70be8de2851047ed0338.zip
Set the default Int maxvalue to the maximum XML-RPC can handle.
Also handle marshalling errors thrown by xmlrpclib more gracefully. ticket 770
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 2cafb0109..225019041 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -420,6 +420,20 @@ class JSONError(PublicError):
format = _('Invalid JSON-RPC request: %(error)s')
+class XMLRPCMarshallError(PublicError):
+ """
+ **910** Raised when the XML-RPC lib cannot marshall the request
+
+ For example:
+
+ >>> raise XMLRPCMarshallError(error='int exceeds XML-RPC limits')
+ Traceback (most recent call last):
+ ...
+ XMLRPCMarshallError: error marshalling data for XML-RPC transport: int exceeds XML-RPC limits
+ """
+
+ errno = 910
+ format = _('error marshalling data for XML-RPC transport: %(error)s')
##############################################################################
# 1000 - 1999: Authentication errors