Skip to content

Commit

Permalink
*) Better error handling for assortment import
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2067 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
theli committed May 8, 2006
1 parent d40ccc5 commit 9104001
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -38,7 +38,10 @@ else if (!this.importAssortmentFile.canRead())
errorMsg = "AssortmentFile '" + this.importAssortmentFile + "' is not readable.";
else if (!this.importAssortmentFile.canWrite())
errorMsg = "AssortmentFile '" + this.importAssortmentFile + "' is not writeable.";

if (errorMsg != null) {
this.log.logSevere(errorMsg);
throw new IllegalStateException(errorMsg);
}

// getting the assortment length
File importAssortmentPath = null;
Expand All @@ -51,12 +54,9 @@ else if (!this.importAssortmentFile.canWrite())
}
} catch (NumberFormatException e) {
errorMsg = "Unable to parse the assortment file number.";
}

if (errorMsg != null) {
this.log.logSevere(errorMsg);
throw new IllegalStateException(errorMsg);
}
}

// initializing the import assortment db
this.log.logInfo("Initializing source assortment file");
Expand Down

0 comments on commit 9104001

Please sign in to comment.