JAVA-8637: addressing PR review comments.

This commit is contained in:
chaos2418
2021-11-23 09:14:57 +05:30
parent a62c0f3c8b
commit 6d824ecf7c
5 changed files with 7 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ public class LambdaExceptionWrappers {
try {
consumer.accept(i);
} catch (ArithmeticException e) {
LOGGER.error("Arithmetic Exception occured : {}", e.getMessage());
LOGGER.error("Arithmetic Exception occurred.", e);
}
};
}
@@ -26,7 +26,7 @@ public class LambdaExceptionWrappers {
} catch (Exception ex) {
try {
E exCast = clazz.cast(ex);
LOGGER.error("Exception occured : {}", exCast.getMessage());
LOGGER.error("Exception occurred.", exCast);
} catch (ClassCastException ccEx) {
throw ex;
}
@@ -51,7 +51,7 @@ public class LambdaExceptionWrappers {
} catch (Exception ex) {
try {
E exCast = exceptionClass.cast(ex);
LOGGER.error("Exception occured : {}", exCast.getMessage());
LOGGER.error("Exception occurred.", exCast);
} catch (ClassCastException ccEx) {
throw new RuntimeException(ex);
}