1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-17 23:05:03 -05:00

Avoid unnecessary error messages

This commit is contained in:
Reinhard Pointner 2016-10-16 16:38:28 +08:00
parent 1363389b60
commit b32fc0c35f

View File

@ -1,6 +1,7 @@
package net.filebot.ui.rename; package net.filebot.ui.rename;
import static net.filebot.util.ExceptionUtilities.*;
import static java.util.Collections.*; import static java.util.Collections.*;
import static java.util.Comparator.*; import static java.util.Comparator.*;
import static java.util.stream.Collectors.*; import static java.util.stream.Collectors.*;
@ -16,6 +17,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@ -51,7 +53,9 @@ class AutoDetectMatcher implements AutoCompleteMatcher {
try { try {
return it.getValue().get().stream(); return it.getValue().get().stream();
} catch (Exception e) { } catch (Exception e) {
if (findCause(e, CancellationException.class) == null) {
log.log(Level.WARNING, "Failed group: " + it.getKey(), e); log.log(Level.WARNING, "Failed group: " + it.getKey(), e);
}
return Stream.empty(); return Stream.empty();
} }
}).sorted(comparing(Match::getValue, OriginalOrder.of(files))).collect(toList()); }).sorted(comparing(Match::getValue, OriginalOrder.of(files))).collect(toList());