From 6439280ec8d4a098cfc9dd728dd1e48a739cd7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 9 Apr 2009 11:28:38 +0200 Subject: [PATCH] Use UserError as exception --- trytond/protocols/dispatcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py index 5197cba9eb..11c875a79a 100644 --- a/trytond/protocols/dispatcher.py +++ b/trytond/protocols/dispatcher.py @@ -112,7 +112,7 @@ def dispatch(host, port, protocol, database_name, user, session, object_type, pool.init() obj = pool.get(object_name, type=object_type) if method not in obj._rpc: - raise Exception('Calling method %s on ' \ + raise Exception('UserError', 'Calling method %s on ' \ '%s %s is not allowed!' % \ (method, object_type, object_name))