merge stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Fri, 02 Apr 2010 14:36:54 +0200
branchstable
changeset 5140 ef1fcd6f48ff
parent 5139 61b607c8571b (diff)
parent 5137 efc280ad9898 (current diff)
child 5141 9ea2250cd049
merge
--- a/server/sources/ldapuser.py	Fri Apr 02 13:53:27 2010 +0200
+++ b/server/sources/ldapuser.py	Fri Apr 02 14:36:54 2010 +0200
@@ -64,7 +64,7 @@
          {'type' : 'choice',
           'default': 'ldap',
           'choices': ('ldap', 'ldaps', 'ldapi'),
-          'help': 'ldap protocol',
+          'help': 'ldap protocol (allowed values: ldap, ldaps, ldapi)',
           'group': 'ldap-source', 'inputlevel': 1,
           }),
 
--- a/web/views/basecontrollers.py	Fri Apr 02 13:53:27 2010 +0200
+++ b/web/views/basecontrollers.py	Fri Apr 02 14:36:54 2010 +0200
@@ -276,7 +276,11 @@
         args = self._cw.form.get('arg', ())
         if not isinstance(args, (list, tuple)):
             args = (args,)
-        args = [simplejson.loads(arg) for arg in args]
+        try:
+            args = [simplejson.loads(arg) for arg in args]
+        except ValueError, exc:
+            self.exception('error while decoding json arguments for js_%s: %s', fname, args, exc)
+            raise RemoteCallFailed(repr(exc)
         try:
             result = func(*args)
         except RemoteCallFailed: