Allow to specify the name for NameAlreadyUsedException
The NameAlreadyUsedException's message did not contain any hints to which name was already in use. The additional constructor allows to pass the already used name in order to provide a more meaningful message. Change-Id: If2a26371e3a3fbc9e5212d9347e78d01ba13dd44
This commit is contained in:
parent
55364017da
commit
7125a01aa2
@ -23,4 +23,8 @@ public class NameAlreadyUsedException extends Exception {
|
||||
public NameAlreadyUsedException() {
|
||||
super(MESSAGE);
|
||||
}
|
||||
|
||||
public NameAlreadyUsedException(String name) {
|
||||
super(MESSAGE + ": " + name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user