mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 10276: Throw exception for account APIs failure
status 10276: resolved fixed
This commit is contained in:
parent
24510cd5fb
commit
427b70e572
@ -31,11 +31,18 @@ public class ActionEventCallback implements MethodInterceptor, AnnotationInterce
|
||||
|
||||
@Override
|
||||
public Object intercept(Object object, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
|
||||
EventVO event = interceptStart(method);;
|
||||
EventVO event = interceptStart(method);
|
||||
boolean success = true;
|
||||
try {
|
||||
return methodProxy.invokeSuper(object, args);
|
||||
} catch (Exception e){
|
||||
success = false;
|
||||
interceptException(method, event);
|
||||
return null;
|
||||
} finally {
|
||||
interceptComplete(method, event);
|
||||
if(success){
|
||||
interceptComplete(method, event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1612,7 +1612,10 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
||||
return true;
|
||||
}
|
||||
|
||||
return deleteAccount(account, callerUserId, caller);
|
||||
if(!deleteAccount(account, callerUserId, caller)){
|
||||
throw new CloudRuntimeException("Unable to delete account " + account.getAccountName() + " in domain " + account.getDomainId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user