Implemented Exeption and their handling
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
package mops.gruppen2.domain.Exceptions;
|
||||
|
||||
public class EventException extends Exception {
|
||||
private String msg;
|
||||
|
||||
public EventException(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package mops.gruppen2.domain.Exceptions;
|
||||
|
||||
public class UserAlreadyExistsException extends EventException {
|
||||
public UserAlreadyExistsException(String msg){
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package mops.gruppen2.domain.Exceptions;
|
||||
|
||||
public class UserNotFoundException extends EventException{
|
||||
public UserNotFoundException(String msg){
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user