Use UserError as exception

This commit is contained in:
Cédric Krier committed 2009-04-09 11:28:38 +02:00
1 parent 7c9754dddd
commit 6439280ec8
1 file changed
+1 -1
+1 -1
View File
@@ -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))