----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5522/#review8483 -----------------------------------------------------------
Hi Anshul, 1) When throwing exceptions that have IDs, please use the addProxyObject() call to fill in those IDs into the exceptions. They will transparently get translated into their corresponding UUIDs when the response is sent back to the caller. This lets the caller know what entities encountered the failure. The addProxyObject() has two signatures, one in which you can send a VO object that contains the id, and the other where you don't have a VO object, so you will send the tablename explicitly as the first parameter to the call. So change this: throw new CloudRuntimeException("Failed to clean up domain resources and sub domains"); to: CloudRuntimeException ex = new CloudRuntimeException("Failed to clean up domain resources and sub domains, delete failed on domain <you may want to put the domain name here> with specified id"); ex.addProxyObject(domain, domain.getId(), "domainId"); --> The third field can be set to any text value by you. If domId is used elsewhere, use "domId" instead of "domainId". throw ex; 2) Do the same as in 1) for the exceptions you're throwing in line 238 and 242 - the caller needs to know the id of the domain. 3) Why are you removing the s_logger statements? It's good to have failures logged to the management server logs - any reason for you wanting to remove them? Regards, Vijay - Venkata Siva Vijayendra Bhamidipati On June 22, 2012, 11:25 a.m., Anshul Gangwar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5522/ > ----------------------------------------------------------- > > (Updated June 22, 2012, 11:25 a.m.) > > > Review request for cloudstack. > > > Description > ------- > > In DomainManagerImpl class in deleteDomain() function , I am throwing > CloudRuntimeException instead of returning false which is giving us detail > errortext. > > > This addresses bugs CS-13537 and CS-14681. > > > Diffs > ----- > > server/src/com/cloud/user/DomainManagerImpl.java 3223d8c > > Diff: https://reviews.apache.org/r/5522/diff/ > > > Testing > ------- > > > Thanks, > > Anshul Gangwar > >