Fixed a NPE while logging the cause of an exception with no cause
@@ -200,8 +200,11 @@ public abstract class AbstractTask implements Callable<NFVMessage>, ApplicationE
private void genericExceptionHandling(Exception e) {
e.printStackTrace();
log.debug("The exception is: " + e.getClass().getName());
+
+ if (e.getCause() != null) {
log.debug("The cause is: " + e.getCause().getClass().getName());
- e.printStackTrace();
+ }
+
VnfmSender vnfmSender;
try {
vnfmSender =
