113114115116117118119
throw new CloudControllerException(msg, e); } public static void handleException(String msg){ log.error(msg); throw new CloudControllerException(msg); }
7071727374757677787980
if (iaasInfo.getComputeService() == null) { String msg = "Compute service is null for IaaS provider: " + iaasInfo.getName(); log.fatal(msg); throw new CloudControllerException(msg); } TemplateBuilder templateBuilder = iaasInfo.getComputeService() .templateBuilder();
6768697071727374
} catch (RegistryException e) { String msg = "Failed to create the registry resource " + CloudControllerConstants.CLOUD_CONTROLLER_RESOURCE; log.error(msg, e); throw new CloudControllerException(msg, e); } }
979899100101102103104105
} catch (Exception e) { String msg = "Failed to persist the cloud controller data in registry."; registryService.rollbackTransaction(); log.error(msg, e); throw new CloudControllerException(msg, e); } }
123124125126127128129130131
146147148149150151152153154
// this means, we've never persisted CC info in registry return null; } catch (RegistryException e) { String msg = "Failed to retrieve cloud controller data from registry."; log.error(msg, e); throw new CloudControllerException(msg, e); } }
171172173174175176177178179
166167168169170171172
* @param msg * exception message */ private static void handleException(String msg) { log.error(msg); throw new CloudControllerException(msg); }
179180181182183184185186
* @param e * exception */ private static void handleException(String msg, Exception e) { log.error(msg, e); throw new CloudControllerException(msg, e); }
335336337338339340341
} public static void handleException(String msg, Exception e){ log.error(msg, e); throw new CloudControllerException(msg, e); }