From e5296ca6f44a03b07600ee2dfe08b5e978599be2 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 8 Mar 2019 14:51:21 +0700 Subject: [PATCH] Improved error logging --- source/net/filebot/Logging.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/Logging.java b/source/net/filebot/Logging.java index 3ddac29b..da5c7a68 100644 --- a/source/net/filebot/Logging.java +++ b/source/net/filebot/Logging.java @@ -10,6 +10,7 @@ import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.io.StringWriter; +import java.lang.reflect.InvocationTargetException; import java.nio.channels.FileChannel; import java.nio.file.StandardOpenOption; import java.time.ZoneId; @@ -123,7 +124,7 @@ public final class Logging { public static String getMessage(Object m, Throwable t) { // try to unravel stacked exceptions - if (t.getCause() != null && (t instanceof RuntimeException || t instanceof ExecutionException)) { + if (t.getCause() != null && (t instanceof RuntimeException || t instanceof ExecutionException || t instanceof InvocationTargetException)) { return getMessage(m, t.getCause()); }