Throw IllegalArgumentException when cannot resolve attribute names

This commit is contained in:
Andrea Boriero 2022-01-13 19:15:58 +01:00
parent bb05cdadc6
commit 1e973a0b55
1 changed files with 5 additions and 3 deletions

View File

@ -144,9 +144,11 @@ public abstract class AbstractSqmPath<T> extends AbstractSqmExpression<T> implem
if ( subNavigable == null ) {
throw new IllegalArgumentException(
String.format(
"Could not resolve attribute '%s' of '%s'",
attributeName, getNavigablePath()
new SemanticException(
String.format(
"Could not resolve attribute '%s' of '%s'",
attributeName, getNavigablePath()
)
)
);
}