aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java8
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsTextEventConverter.java8
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java
index 0f3a21bdc..89e2e8110 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java
@@ -80,19 +80,19 @@ public final class Apex2JmsObjectEventConverter implements ApexEventProtocolConv
Method getObjectMethod;
try {
getObjectMethod = eventObject.getClass().getMethod("getObject", (Class<?>[]) null);
- } catch (Exception e) {
+ } catch (Exception exp) {
final String errorMessage = "message \"" + eventObject
+ "\" received from JMS does not have a \"getObject()\" method";
- throw new ApexEventRuntimeException(errorMessage);
+ throw new ApexEventRuntimeException(errorMessage, exp);
}
Object jmsIncomingObject;
try {
jmsIncomingObject = getObjectMethod.invoke(eventObject, (Object[]) null);
- } catch (final Exception e) {
+ } catch (final Exception exp) {
final String errorMessage = "object contained in message \"" + eventObject
+ "\" received from JMS could not be retrieved as a Java object";
- throw new ApexEventRuntimeException(errorMessage, e);
+ throw new ApexEventRuntimeException(errorMessage, exp);
}
// Check that the consumer parameters for JMS->Apex messaging have been set
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsTextEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsTextEventConverter.java
index e9f9109c0..701d61ef9 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsTextEventConverter.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsTextEventConverter.java
@@ -47,20 +47,20 @@ public final class Apex2JmsTextEventConverter extends Apex2JsonEventConverter {
Method getTextMethod;
try {
getTextMethod = eventObject.getClass().getMethod("getText", (Class<?>[]) null);
- } catch (Exception e) {
+ } catch (Exception exp) {
final String errorMessage = "message \"" + eventObject
+ "\" received from JMS does not have a \"getText()\" method";
- throw new ApexEventRuntimeException(errorMessage);
+ throw new ApexEventRuntimeException(errorMessage, exp);
}
String jmsString;
try {
jmsString = (String) getTextMethod.invoke(eventObject, (Object[]) null);
- } catch (final Exception e) {
+ } catch (final Exception exp) {
final String errorMessage = "object contained in message \"" + eventObject
+ "\" received from JMS could not be retrieved as a Java String";
- throw new ApexEventRuntimeException(errorMessage, e);
+ throw new ApexEventRuntimeException(errorMessage, exp);
}
// Use the generic JSON plugin from here