Create NotFoundExceptions with id fields

This commit is contained in:
René Pfeuffer
2018-07-12 10:20:16 +02:00
parent 4e207713bf
commit 42543f6a47
7 changed files with 16 additions and 18 deletions

View File

@@ -52,7 +52,7 @@ public class GroupNotFoundException extends GroupException
* Constructs a new GroupNotFoundException.
*
*/
public GroupNotFoundException() {
super("group does not exist");
public GroupNotFoundException(Group group) {
super("group " + group.getName() + " does not exist");
}
}

View File

@@ -52,8 +52,8 @@ public class RepositoryNotFoundException extends RepositoryException
* error detail message.
*
*/
public RepositoryNotFoundException() {
super("repository does not exist");
public RepositoryNotFoundException(Repository repository) {
super("repository " + repository.getName() + "/" + repository.getNamespace() + " does not exist");
}
public RepositoryNotFoundException(String repositoryId) {

View File

@@ -51,7 +51,7 @@ public class UserNotFoundException extends UserException
* Constructs a new UserNotFoundException.
*
*/
public UserNotFoundException() {
super("user does not exist");
public UserNotFoundException(User user) {
super("user " + user.getName() + " does not exist");
}
}