Skip to content

Commit

Permalink
improved error message per #3804, #2797
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Sep 11, 2020
1 parent 1d0d331 commit 1e44963
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ private void updateSchema(Connection conn, DependencyVersion appExpectedVersion,
DBUtils.closeStatement(statement);
}
} catch (IllegalArgumentException | IOException ex) {
if ("data/upgrade_4.2.sql".equals(updateFile)) {
throw new DatabaseException("unable to upgrade the database schema - please run the dependency-check purge command to remove the existing database");
}
final String msg = String.format("Upgrade SQL file does not exist: %s", updateFile);
throw new DatabaseException(msg, ex);
}
Expand Down

0 comments on commit 1e44963

Please sign in to comment.