Use UserError as exception
This commit is contained in:
1 parent
7c9754dddd
commit
6439280ec8
1 file changed
+1
-1
@@ -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))
|
||||
|
||||
|
||||
Reference in new issue
Block a user