Skip to content

Commit

Permalink
Clarify log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sebr72 committed May 21, 2024
1 parent 3d6c260 commit 873034c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ public void setAttributes(final Map<String, Attribute> attributes) {
for (Map.Entry<String, Attribute> entry : attributes.entrySet()) {
Attribute attribute = entry.getValue();
if (attribute == null) {
final String msg =
"Attribute: '" + entry.getKey() + "' is not an attribute. It is a: " + null;
final String msg = "Attribute: '" + entry.getKey() + "' is not a defined attribute.";
LOGGER.error("Error setting the Attributes: {}", msg);
throw new IllegalArgumentException(msg);
} else {
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/java/org/mapfish/print/config/Template.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ public final void setAttributes(final Map<String, Attribute> attributes) {
for (Map.Entry<String, Attribute> entry : attributes.entrySet()) {
Attribute attribute = entry.getValue();
if (attribute == null) {
final String msg =
"Attribute: '" + entry.getKey() + "' is not an attribute. It is a: " + null;
final String msg = "Attribute: '" + entry.getKey() + "' is not a defined attribute";
LOGGER.error("Error setting the Attributes: {}", msg);
throw new IllegalArgumentException(msg);
} else {
Expand Down Expand Up @@ -169,7 +168,7 @@ public final void setProcessors(final List<Processor> processors) {
private void assertProcessors(final List<Processor> processorsToCheck) {
for (Processor entry : processorsToCheck) {
if (entry == null) {
final String msg = "Processor: " + null + " is not a processor.";
final String msg = "Processor is missing.";
LOGGER.error("Error in the processors to check while setting the Attributes: {}", msg);
throw new IllegalArgumentException(msg);
}
Expand Down

0 comments on commit 873034c

Please sign in to comment.