Skip to content

Commit

Permalink
add type name to the message
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchooly committed Apr 30, 2023
1 parent 997dfd0 commit 2aee592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static Constructor<?> bestConstructor(EntityModel model) {
return constructors.stream()
.filter(it -> it.getParameters().length == 0)
.findFirst()
.orElseThrow(() -> new IllegalStateException("A type with lifecycle events must have a no-arg constructor"));
.orElseThrow(() -> new IllegalStateException(Sofia.lifecycleNoargs(model.getType())));
}

return constructors.stream()
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/sofia.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ invalid.index.path=The path ''{0}'' can not be validated against ''{1}'' and may
invalid.path.target=Could not resolve path ''{0}'' against ''{1}''. Unknown path element: ''{2}''.
key.not.allowed.as.property=Keys are not allowed as properties. Use (lazy) references instead.
legacy.operation=This is a legacy operation and is not supported on this version of the API.
lifecycle.noargs=A type with lifecycle events must have a no-arg constructor: {0}
logged.query=logged query: {0}
mismatched.field.on.external.type=Mapped field ''{0}'' on ''{1}'' does not match any fields on ''{2}''.
mismatched.method.on.external.type=Mapped method ''{0}'' with parameters {1} on ''{2}'' does not match any methods on ''{3}''.
Expand Down

0 comments on commit 2aee592

Please sign in to comment.