diff -r 5e9055b8c10a -r 2543cfa5d54a web/views/basecontrollers.py --- a/web/views/basecontrollers.py Tue Apr 06 18:51:17 2010 +0200 +++ b/web/views/basecontrollers.py Tue Apr 06 19:08:07 2010 +0200 @@ -277,7 +277,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, DirectResponse): @@ -442,6 +446,7 @@ view = req.vreg['views'].select('doreledit', req, rset=rset, rtype=args['rtype']) stream = view.set_stream() view.render(**args) + # XXX why not _call_view ? extresources = req.html_headers.getvalue(skiphead=True) if extresources: stream.write(u'
\n')