From b509f108d0b83cdd0fc683b3c865cd0bd29a0b1b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 2 Mar 2012 04:14:01 +0000 Subject: [PATCH] * improved error reporting --- BuildData.groovy | 2 +- installer/appbundle/filebot | 2 +- .../filebot/ui/analyze/ExtractTool.java | 30 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/BuildData.groovy b/BuildData.groovy index d07420ee..d0c3986c 100644 --- a/BuildData.groovy +++ b/BuildData.groovy @@ -52,7 +52,7 @@ names += anime.findResults{ it.getPrimaryTitle() } names += anime.findResults{ it.getOfficialTitle('en') } names = names.findAll{ it =~ /^[A-Z0-9]/ && it =~ /[\p{Alpha}]{3}/}.findResults{ net.sourceforge.filebot.similarity.Normalization.normalizePunctuation(it) } -names = names*.toLowerCase().sort().unique() +names = names.sort().unique() gz(s_out, names) diff --git a/installer/appbundle/filebot b/installer/appbundle/filebot index 3297e8ed..5f1612b7 100644 --- a/installer/appbundle/filebot +++ b/installer/appbundle/filebot @@ -4,4 +4,4 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" dir_app=$dir_bin/../Resources/Java -java -Dapplication.deployment=app "-Djna.library.path=$dir_app" -Xmx256m -jar "$dir_app/FileBot.jar" "$@" +java -Dapplication.deployment=app "-Djna.library.path=$dir_app" "-Djava.library.path=$dir_app" -Xmx256m -jar "$dir_app/FileBot.jar" "$@" diff --git a/source/net/sourceforge/filebot/ui/analyze/ExtractTool.java b/source/net/sourceforge/filebot/ui/analyze/ExtractTool.java index f85e2a3e..595fc712 100644 --- a/source/net/sourceforge/filebot/ui/analyze/ExtractTool.java +++ b/source/net/sourceforge/filebot/ui/analyze/ExtractTool.java @@ -80,12 +80,12 @@ class ExtractTool extends Tool { protected TableModel createModelInBackground(FolderNode sourceModel) throws InterruptedException { List entries = new ArrayList(); - for (Iterator iterator = sourceModel.fileIterator(); iterator.hasNext();) { - File file = iterator.next(); - - // ignore non-archives files and trailing multi-volume parts - if (Archive.VOLUME_ONE_FILTER.accept(file)) { - try { + try { + for (Iterator iterator = sourceModel.fileIterator(); iterator.hasNext();) { + File file = iterator.next(); + + // ignore non-archives files and trailing multi-volume parts + if (Archive.VOLUME_ONE_FILTER.accept(file)) { Archive archive = new Archive(file); try { for (File it : archive.listFiles()) { @@ -94,19 +94,19 @@ class ExtractTool extends Tool { } finally { archive.close(); } - } catch (Exception e) { - // unwind thread, if we have been cancelled - if (findCause(e, InterruptedException.class) != null) { - throw findCause(e, InterruptedException.class); - } - UILogger.log(Level.WARNING, e.getMessage(), e); + } + + // unwind thread, if we have been cancelled + if (Thread.interrupted()) { + throw new InterruptedException(); } } - + } catch (Exception e) { // unwind thread, if we have been cancelled - if (Thread.interrupted()) { - throw new InterruptedException(); + if (findCause(e, InterruptedException.class) != null) { + throw findCause(e, InterruptedException.class); } + UILogger.log(Level.WARNING, e.getMessage(), e); } return new ArchiveEntryModel(entries);