From 5cce75c0b9e016969d81400f1cefe64f7ed26d2e Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 20 Feb 2019 19:47:40 +0700 Subject: [PATCH] Use any lazy Object::toString as message --- source/net/filebot/Logging.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/Logging.java b/source/net/filebot/Logging.java index af5319e6..469a16d8 100644 --- a/source/net/filebot/Logging.java +++ b/source/net/filebot/Logging.java @@ -109,7 +109,7 @@ public final class Logging { }; } - public static Supplier cause(String m, Throwable t) { + public static Supplier cause(Object m, Throwable t) { return () -> getMessage(m, t); } @@ -121,7 +121,7 @@ public final class Logging { return () -> getMessage(elements); } - private static String getMessage(String m, Throwable t) { + private static String getMessage(Object m, Throwable t) { // try to unravel stacked exceptions if (t.getCause() != null && (t instanceof RuntimeException || t instanceof ExecutionException)) { return getMessage(m, t.getCause());