commit | 7125a01aa2ff66994ceb2903866e75f8ad4f6cb3 | [log] [tgz] |
---|---|---|
author | Christian Aistleitner <christian@quelltextlich.at> | Sun Feb 17 18:10:20 2013 +0100 |
committer | Bruce Zu <bruce.zu@sonymobile.com> | Mon Feb 18 16:49:15 2013 +0800 |
tree | a32e41348b1fbe5d7ea618d1c5d91ab8746ac4cf | |
parent | 55364017dac3c3e1e07fb2a7a25da5217277f1dc [diff] |
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
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/NameAlreadyUsedException.java b/gerrit-common/src/main/java/com/google/gerrit/common/errors/NameAlreadyUsedException.java index a2d487b..d3988ff 100644 --- a/gerrit-common/src/main/java/com/google/gerrit/common/errors/NameAlreadyUsedException.java +++ b/gerrit-common/src/main/java/com/google/gerrit/common/errors/NameAlreadyUsedException.java
@@ -23,4 +23,8 @@ public NameAlreadyUsedException() { super(MESSAGE); } + + public NameAlreadyUsedException(String name) { + super(MESSAGE + ": " + name); + } }