私の質問は次のとおりです。CalTransactionFactoryが初期化されていないか、クラスが存在しないとします。次に、その例外を捕捉して例外をスローしたいと思います。したがって、RuntimeExceptionまたはExceptionの下に来るはずです。以下のコード例外の処理方法
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());
}
正確な質問は何ですか? – talnicolas
私の最初の行を見てください。 – AKIWEB