Skip to content

Commit

Permalink
Change dB message scope of unfilled attributes -- now debug instead o…
Browse files Browse the repository at this point in the history
…f error.
  • Loading branch information
aufdemrand committed Nov 12, 2013
1 parent 4385578 commit af56b48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/net/aufdemrand/denizen/objects/Element.java
Expand Up @@ -597,6 +597,8 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))
if (attribute.startsWith("with")) {
if (attribute.hasContext(1)) {
replacement = attribute.getContext(1);
if (replacement == null)
replacement = "";
attribute.fulfill(1);
}
}
Expand Down Expand Up @@ -768,10 +770,10 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// Unfilled attributes past this point probably means the tag is spelled
// incorrectly. So instead of just passing through what's been resolved
// so far, 'null' shall be returned with an error message.
// so far, 'null' shall be returned with a debug message.

if (attribute.attributes.size() > 0) {
dB.echoError("Unfilled attributes '" + attribute.attributes.toString() + "'" +
dB.echoDebug(attribute.getScriptEntry(), "Unfilled attributes '" + attribute.attributes.toString() + "'" +
"for tag <" + attribute.getOrigin() + ">!");
return "null";
} else {
Expand Down

0 comments on commit af56b48

Please sign in to comment.