[Minor] use locator when throwing exceptions
This commit is contained in:
parent
5cb0982b2f
commit
6ae9cbf866
|
@ -86,8 +86,8 @@ public abstract class AbstractStrolchElement implements StrolchElement {
|
||||||
@Override
|
@Override
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
if (StringHelper.isEmpty(name)) {
|
if (StringHelper.isEmpty(name)) {
|
||||||
String msg = "The name may never be empty for {0} with id {1}";
|
String msg = "The name may never be empty for {0} {1}";
|
||||||
msg = MessageFormat.format(msg, getClass().getSimpleName(), id);
|
msg = MessageFormat.format(msg, getClass().getSimpleName(), getLocator());
|
||||||
throw new StrolchException(msg);
|
throw new StrolchException(msg);
|
||||||
}
|
}
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
Loading…
Reference in New Issue