Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.mongodb.hibernate.jdbc;

import com.mongodb.hibernate.internal.FeatureNotSupportedException;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
Expand Down Expand Up @@ -102,12 +103,12 @@ default String getDriverVersion() throws SQLException {

@Override
default int getDriverMajorVersion() {
throw new RuntimeException("getDriverMajorVersion not implemented");
throw new FeatureNotSupportedException("getDriverMajorVersion not implemented");
}

@Override
default int getDriverMinorVersion() {
throw new RuntimeException("getDriverMinorVersion not implemented");
throw new FeatureNotSupportedException("getDriverMinorVersion not implemented");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private static boolean isExcludeProjectSpecification(Map.Entry<String, BsonValue
var exclude = (value.isBoolean() && !value.asBoolean().getValue())
|| (value.isNumber() && value.asNumber().intValue() == 0);
if (exclude && !key.equals(ID_FIELD_NAME)) {
throw new RuntimeException(format(
throw new FeatureNotSupportedException(format(
"Exclusions are not allowed in `$project` specifications, except for the [%s] field: [%s, %s]",
ID_FIELD_NAME, key, value));
}
Expand Down