From f2a98fd607c5e9b401da7f709537d039e2fe456f Mon Sep 17 00:00:00 2001 From: Chandan Ghosh Date: Wed, 5 Sep 2018 12:43:02 +0530 Subject: Added error log in MusicConditional class Added error log in MusicConditional class where it was missing. Reported in Sonar. Issue-ID: MUSIC-129 Change-Id: I8d3102547015313520b67058312e4072f621ca34 Signed-off-by: Chandan Ghosh --- .../java/org/onap/music/conductor/conditionals/MusicConditional.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java b/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java index c97ccfab..a2c3fd39 100644 --- a/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java +++ b/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java @@ -107,6 +107,7 @@ public class MusicConditional { return lockAcqResult; } } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.EXECUTIONINTERRUPTED); MusicCore.destroyLockRef(lockId); return new ReturnType(ResultType.FAILURE, e.getMessage()); } @@ -143,6 +144,7 @@ public class MusicConditional { } catch (Exception e) { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); + logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.EXECUTIONINTERRUPTED, ErrorSeverity.ERROR, ErrorTypes.LOCKINGERROR); String exceptionAsString = sw.toString(); return new ReturnType(ResultType.FAILURE, "Exception thrown while doing the critical put, check sanctity of the row/conditions:\n" @@ -169,6 +171,7 @@ public class MusicConditional { } } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.EXECUTIONINTERRUPTED, ErrorSeverity.ERROR, ErrorTypes.LOCKINGERROR); MusicCore.destroyLockRef(lockId); return new ReturnType(ResultType.FAILURE, e.getMessage()); @@ -211,6 +214,7 @@ public class MusicConditional { } } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.EXECUTIONINTERRUPTED, ErrorSeverity.ERROR, ErrorTypes.LOCKINGERROR); StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); String exceptionAsString = sw.toString(); -- cgit 1.2.3-korg