[Minor] use locator when throwing exceptions

This commit is contained in:
Robert von Burg 2014-03-28 18:43:04 +01:00
parent 5cb0982b2f
commit 6ae9cbf866
1 changed files with 2 additions and 2 deletions

View File

@ -86,8 +86,8 @@ public abstract class AbstractStrolchElement implements StrolchElement {
@Override
public void setName(String name) {
if (StringHelper.isEmpty(name)) {
String msg = "The name may never be empty for {0} with id {1}";
msg = MessageFormat.format(msg, getClass().getSimpleName(), id);
String msg = "The name may never be empty for {0} {1}";
msg = MessageFormat.format(msg, getClass().getSimpleName(), getLocator());
throw new StrolchException(msg);
}
this.name = name;