Index: branches/b_4_11_00_00/tdal/src/main/java/com/gpc/tams/repository/pricingsdk/PriceSDKWrapper.java =================================================================== diff -u -r255685 -r255744 --- branches/b_4_11_00_00/tdal/src/main/java/com/gpc/tams/repository/pricingsdk/PriceSDKWrapper.java (.../PriceSDKWrapper.java) (revision 255685) +++ branches/b_4_11_00_00/tdal/src/main/java/com/gpc/tams/repository/pricingsdk/PriceSDKWrapper.java (.../PriceSDKWrapper.java) (revision 255744) @@ -8,6 +8,8 @@ import com.gpc.pricecalculation.api.PriceCalculationFactory; import com.gpc.pricecalculation.api.dto.PriceInDto; import com.gpc.pricecalculation.api.dto.PriceOutDto; +import com.gpc.pricecalculation.services.exceptions.PriceHandlerException; +import com.gpc.pricecalculation.services.exceptions.PriceInValidationException; import com.gpc.tams.repository.storedprocs.PriceInfo; public class PriceSDKWrapper { @@ -30,14 +32,24 @@ */ public static PriceInfo retreivePricesFromSDK(PriceInDto priceInDto, Connection connection) { - if (priceCalculationInstance != null) { - logger.info("Input Parameters for SDK " + priceInDto); + try { + if (priceCalculationInstance != null) { + logger.info("Input Parameters for SDK " + priceInDto); - // Output Parameters - PriceOutDto priceOut = priceCalculationInstance.getPrice(connection, priceInDto); - logger.info("Output Parameters from SDK " + priceOut); - return PriceOutDTOMapper.setPriceOutVO(priceOut, - (priceOut != null && priceOut.getPerCar() != null) ? priceOut.getPerCar() : 0); + // Output Parameters + PriceOutDto priceOut = priceCalculationInstance.getPrice(connection, priceInDto); + logger.info("Output Parameters from SDK " + priceOut); + return PriceOutDTOMapper.setPriceOutVO(priceOut, + (priceOut != null && priceOut.getPerCar() != null) ? priceOut.getPerCar() : 0); + } + } catch (PriceHandlerException priceHandlerException) { + logger.error("Price Handler Exception Occured While Reterving Price From SDK " + + priceHandlerException.getLocalizedMessage()); + } catch (PriceInValidationException priceValidationException) { + logger.error("PriceIn Validation Exception Occured While Reterving Price From SDK " + + priceValidationException.getLocalizedMessage()); + } catch (Exception ex) { + logger.error("Exception Occured While Reterving Price From SDK " + ex.getLocalizedMessage()); } return new PriceInfo(); }