My question is If Suppose CalTransactionFactory is not initialized or class does not exist. Then I want to catch that exception and throw an exception. So it should be coming under RuntimeException or Exception. below is the code
try {
calTransaction = CalTransactionFactory.create("PDS_GeoLocationService");
calTransaction.setName("GetLocationByIp");
calEvent=CalEventFactory.create("PersonalizationGeoLocationService");
calEvent.setName("IPAddress");
calEvent.addData("RemoteIP",ipAddress);
calEvent.completed();
calTransaction.setStatus("0");
} catch (RuntimeException re) {
calTransaction.setStatus(re);
getLogger().log(LogLevel.ERROR, "CAL is not initialized" +re.getMessage());
throw re;
}
catch (Exception e) {
getLogger().log(LogLevel.ERROR, "CAL is not initialized" +e.getMessage());
}