web/views/basecontrollers.py
branchstable
changeset 5139 61b607c8571b
parent 5113 f8cbdb51e6d4
child 5141 9ea2250cd049
--- a/web/views/basecontrollers.py	Fri Apr 02 13:48:16 2010 +0200
+++ b/web/views/basecontrollers.py	Fri Apr 02 14:28:43 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: