mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 22:09:47 -04:00
Use any lazy Object::toString as message
This commit is contained in:
parent
2dea2091d4
commit
5cce75c0b9
@ -109,7 +109,7 @@ public final class Logging {
|
||||
};
|
||||
}
|
||||
|
||||
public static Supplier<String> cause(String m, Throwable t) {
|
||||
public static Supplier<String> 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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user