* improved error reporting

This commit is contained in:
Reinhard Pointner 2012-03-02 04:14:01 +00:00
parent 59a44ea8ff
commit b509f108d0
3 changed files with 17 additions and 17 deletions

View File

@ -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)

View File

@ -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" "$@"

View File

@ -80,12 +80,12 @@ class ExtractTool extends Tool<TableModel> {
protected TableModel createModelInBackground(FolderNode sourceModel) throws InterruptedException {
List<ArchiveEntry> entries = new ArrayList<ArchiveEntry>();
for (Iterator<File> 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<File> 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<TableModel> {
} 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);