+ if isinstance(e, CommandException):\r
+ response = {\r
+ 'success': False,\r
+ 'error_message': e.message\r
+ }\r
+ else:\r
+ logging.error("%s: %s" % (func.__name__, str(e)))\r
+ response = {\r
+ 'success': False,\r
+ 'error_message': _("We're sorry, but an unknown error ocurred.<br />Please try again in a while.")\r
+ }\r