1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* 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 += 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.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) 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_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
dir_app=$dir_bin/../Resources/Java 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 { protected TableModel createModelInBackground(FolderNode sourceModel) throws InterruptedException {
List<ArchiveEntry> entries = new ArrayList<ArchiveEntry>(); List<ArchiveEntry> entries = new ArrayList<ArchiveEntry>();
for (Iterator<File> iterator = sourceModel.fileIterator(); iterator.hasNext();) { try {
File file = iterator.next(); 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)) { // ignore non-archives files and trailing multi-volume parts
try { if (Archive.VOLUME_ONE_FILTER.accept(file)) {
Archive archive = new Archive(file); Archive archive = new Archive(file);
try { try {
for (File it : archive.listFiles()) { for (File it : archive.listFiles()) {
@ -94,19 +94,19 @@ class ExtractTool extends Tool<TableModel> {
} finally { } finally {
archive.close(); archive.close();
} }
} catch (Exception e) { }
// unwind thread, if we have been cancelled
if (findCause(e, InterruptedException.class) != null) { // unwind thread, if we have been cancelled
throw findCause(e, InterruptedException.class); if (Thread.interrupted()) {
} throw new InterruptedException();
UILogger.log(Level.WARNING, e.getMessage(), e);
} }
} }
} catch (Exception e) {
// unwind thread, if we have been cancelled // unwind thread, if we have been cancelled
if (Thread.interrupted()) { if (findCause(e, InterruptedException.class) != null) {
throw new InterruptedException(); throw findCause(e, InterruptedException.class);
} }
UILogger.log(Level.WARNING, e.getMessage(), e);
} }
return new ArchiveEntryModel(entries); return new ArchiveEntryModel(entries);