Skip to content

Commit

Permalink
better error msg if kffDb not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Filipe authored and Luis Filipe committed Dec 28, 2019
1 parent cf52d97 commit 58093e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions iped-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.settings/
/.classpath
/.project
/bin/
3 changes: 3 additions & 0 deletions iped-app/src/main/java/dpf/sp/gpinf/indexer/IndexFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ void importKFF(File kffPath) {
KFFTask kff = new KFFTask();
kff.init(Configuration.getInstance().properties, null, true);
kff.importKFF(kffPath);
} catch (IPEDException e) {
System.out.println(e.toString());

} catch (Exception e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,16 @@ public void init(Properties confParams, File confDir) throws Exception {
excludeKffIgnorable = Boolean.valueOf(confParams.getProperty("excludeKffIgnorable").trim()); //$NON-NLS-1$

String kffDbPath = confParams.getProperty("kffDb"); //$NON-NLS-1$
if (taskEnabled && kffDbPath == null) {
String msg = "Configure hash database path on " + Configuration.LOCAL_CONFIG; //$NON-NLS-1$
LOGGER.error(msg);
taskEnabled = false;
return;
if (kffDbPath == null) {
String msg = "Configure hash database path (kffDb) on " + Configuration.LOCAL_CONFIG; //$NON-NLS-1$
if(importing) {
throw new IPEDException(msg);
}
if(taskEnabled) {
LOGGER.error(msg);
taskEnabled = false;
return;
}
}

// backwards compatibility
Expand Down

0 comments on commit 58093e7

Please sign in to comment.