Skip to content

Commit

Permalink
Refactor: change exception message
Browse files Browse the repository at this point in the history
# change
1. remove punctuation at the end of exception messages
2. replace square brackets with single quotes
  • Loading branch information
FULaBUla committed Apr 12, 2024
1 parent 71f1276 commit 38ba710
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ public SqmDynamicInstantiation<?> visitInstantiation(HqlParser.InstantiationCont
if ( !dynamicInstantiation.checkInstantiation( creationContext.getTypeConfiguration() ) ) {
final Class<?> type = dynamicInstantiation.getJavaType();
if ( dynamicInstantiation.isFullyAliased() ) {
throw new SemanticException("Missing constructor or attributes for injection into type [" + type + "]." +
throw new SemanticException("Missing constructor or attributes for injection into type '" + type + "'" +
"Expected arguments are: " + dynamicInstantiation.argumentTypes(), query);
}
else {
Expand All @@ -1516,7 +1516,7 @@ public SqmDynamicInstantiation<?> visitInstantiation(HqlParser.InstantiationCont
.collect(Collectors.joining(","));
}

throw new SemanticException("Unable to locate appropriate constructor on class [" + type + "]. " +
throw new SemanticException("Unable to locate appropriate constructor on class '" + type + "'. " +
"Expected arguments are: " + dynamicInstantiation.argumentTypes() + conjecture, query);
}
}
Expand Down

0 comments on commit 38ba710

Please sign in to comment.