mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
Create NotFoundExceptions with id fields
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user