From 219ef08ffde8482dbaf6dfa151d9d06da7aabf4e Mon Sep 17 00:00:00 2001 From: "Smokowski, Steve (ss835w)" Date: Thu, 9 Aug 2018 12:44:57 -0400 Subject: Fix Logging Add more logging information for Java.Lang Exceptions Issue-ID: SO-822 Change-Id: I5eb25adc087c9fb495829af2c9d0d1be7374f4a3 Change-Id: I5eb25adc087c9fb495829af2c9d0d1be7374f4a3 Signed-off-by: Smokowski, Steve (ss835w) --- .../groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bpmn/MSOCommonBPMN') diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy index de5408fac5..4b701e6a58 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy @@ -381,15 +381,22 @@ class ExceptionUtil extends AbstractServiceTaskProcessor { msoLogger.debug("Started processJavaException Method") // if the BPMN flow java error handler sets "BPMN_javaExpMsg", append it to the WFE String javaExpMsg = execution.getVariable("BPMN_javaExpMsg") + String errorMessage = execution.getVariable("gUnknownError") String wfeExpMsg = "Catch a Java Lang Exception in " + processKey if (javaExpMsg != null && !javaExpMsg.empty) { wfeExpMsg = wfeExpMsg + ": " + javaExpMsg } + if (errorMessage != null && !errorMessage.empty) { + msoLogger.error("Unknown Error: " + errorMessage); + } + msoLogger.error("Java Error: " + wfeExpMsg); buildWorkflowException(execution, 2500, wfeExpMsg) }catch(BpmnError b){ + msoLogger.error(b); throw b }catch(Exception e){ + msoLogger.error(e); msoLogger.debug("Caught Exception during processJavaException Method: " + e) buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception") } -- cgit 1.2.3-korg