Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Feb 6, 2025
1 parent 11519ff commit 0a7eaae
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public final DatabaseMetadata getDatabaseMetadata() {
return databaseMetadata;
}

private DatabaseVersion getCityDBVersion(Connection connection) throws SQLException {
private DatabaseVersion getCityDBVersion(Connection connection) throws DatabaseException {
try (Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(schemaAdapter.getCityDBVersion())) {
if (rs.next()) {
Expand All @@ -108,12 +108,14 @@ private DatabaseVersion getCityDBVersion(Connection connection) throws SQLExcept
rs.getInt("minor_revision"),
rs.getString("version"));
}
} catch (SQLException e) {
throw new DatabaseException("Failed to retrieve the version of the 3DCityDB.", e);
}

throw new SQLException("Failed to retrieve the version of the 3DCityDB.");
throw new DatabaseException("Failed to retrieve the version of the 3DCityDB.");
}

private SpatialReference getDatabaseSrs(Connection connection) throws SQLException {
private SpatialReference getDatabaseSrs(Connection connection) throws DatabaseException {
try (Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(schemaAdapter.getDatabaseSrs())) {
if (rs.next()) {
Expand All @@ -123,8 +125,10 @@ private SpatialReference getDatabaseSrs(Connection connection) throws SQLExcepti
rs.getString("srs_name"),
rs.getString("wktext"));
}
} catch (SQLException e) {
throw new DatabaseException("Failed to retrieve the spatial reference system of the 3DCityDB.", e);
}

throw new SQLException("Failed to retrieve the spatial reference system of the 3DCityDB.");
throw new DatabaseException("Failed to retrieve the spatial reference system of the 3DCityDB.");
}
}

0 comments on commit 0a7eaae

Please sign in to comment.