From 886e417fd76b25a28cde70be8de2851047ed0338 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 17 Jan 2011 16:23:53 -0500 Subject: Set the default Int maxvalue to the maximum XML-RPC can handle. Also handle marshalling errors thrown by xmlrpclib more gracefully. ticket 770 --- ipalib/errors.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ipalib/errors.py') 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 -- cgit