From ba7043404a8806cf5ac0d1f534f3a51b67a445c5 Mon Sep 17 00:00:00 2001 From: Chakshu Gautam Date: Sat, 1 Apr 2023 12:03:52 +0530 Subject: [PATCH] Add JAXBException --- .../com/uci/outbound/consumers/OutboundKafkaController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java b/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java index ba89dde..f3c5893 100644 --- a/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java +++ b/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java @@ -110,7 +110,11 @@ public void accept(XMessageDAO xMessageDAO) { }); }catch(Exception e){ log.error("Exception in convertXMessageToDAO:" + e.getMessage()); - log.error("The current XMessage was " + xMessage.toXML()); + try{ + log.error("The current XMessage was " + xMessage.toXML()); + }catch(JAXBException j) { + log.error("Unable to parse the current XMessage " + xMessage.toString()); + } } } else { log.info("XMessage -> app is empty");