*) Better error handling for assortment import

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2067 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent d40ccc5208
commit 9104001e7c

@ -38,7 +38,10 @@ public class plasmaWordIndexAssortmentImporter extends AbstractImporter implemen
errorMsg = "AssortmentFile '" + this.importAssortmentFile + "' is not readable."; errorMsg = "AssortmentFile '" + this.importAssortmentFile + "' is not readable.";
else if (!this.importAssortmentFile.canWrite()) else if (!this.importAssortmentFile.canWrite())
errorMsg = "AssortmentFile '" + this.importAssortmentFile + "' is not writeable."; errorMsg = "AssortmentFile '" + this.importAssortmentFile + "' is not writeable.";
if (errorMsg != null) {
this.log.logSevere(errorMsg);
throw new IllegalStateException(errorMsg);
}
// getting the assortment length // getting the assortment length
File importAssortmentPath = null; File importAssortmentPath = null;
@ -51,9 +54,6 @@ public class plasmaWordIndexAssortmentImporter extends AbstractImporter implemen
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
errorMsg = "Unable to parse the assortment file number."; errorMsg = "Unable to parse the assortment file number.";
}
if (errorMsg != null) {
this.log.logSevere(errorMsg); this.log.logSevere(errorMsg);
throw new IllegalStateException(errorMsg); throw new IllegalStateException(errorMsg);
} }

Loading…
Cancel
Save