Define and throw a dedicated exception instead of using a generic one
Sonar Link:
https://sonar.onap.org/component_issues?id=org.onap.dcaegen2.platform%3Ainventory-api#resolved=false|severities=CRITICAL|assignees=Snigdha503415
Location:
src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java
Line No-134
Change-Id: I94f4d39fd55dc11c1459971074944fc2ff589cae
Issue-ID: DCAEGEN2-214
Signed-off-by: Snigdha Sucharita Patra <sp00503415@techmahindra.com>
LOG.info(String.format("Sql view created: %s", viewName));
}
} catch (Exception e) {
- throw new RuntimeException("", e);
+ throw new InventoryDAOManagerSetupException("view does not exist, " + e);
}
// Do this assignment at the end after performing table checks to ensure that connection is good