use of com.emc.cloud.platform.ucs.out.model.ConfigResolveClass in project coprhd-controller by CoprHD.
the class UCSMSession method checkForResponseStatusErrors.
private void checkForResponseStatusErrors(Object response) throws ClientGeneralException {
String errorCode = null;
String errorDescription = null;
if (response instanceof ConfigResolveDn) {
ConfigResolveDn configResolveDn = ((ConfigResolveDn) response);
errorCode = configResolveDn.getErrorCode();
errorDescription = configResolveDn.getErrorDescr();
} else if (response instanceof ConfigConfMo) {
ConfigConfMo configResolveDn = ((ConfigConfMo) response);
errorCode = configResolveDn.getErrorCode();
errorDescription = configResolveDn.getErrorDescr();
} else if (response instanceof ConfigResolveClass) {
ConfigResolveClass configResolveDn = ((ConfigResolveClass) response);
errorCode = configResolveDn.getErrorCode();
errorDescription = configResolveDn.getErrorDescr();
}
if (errorCode != null) {
String[] errors = new String[] { errorDescription };
throw new ClientGeneralException(ClientMessageKeys.byErrorCode(parseNumber(errorCode).intValue()), errors);
}
}
Aggregations