diff --git a/src/main/java/cat/udl/eps/softarch/demo/exceptions/VolunteerCannotKickHimself.java b/src/main/java/cat/udl/eps/softarch/demo/exceptions/VolunteerCannotKickHimself.java new file mode 100644 index 0000000..822601a --- /dev/null +++ b/src/main/java/cat/udl/eps/softarch/demo/exceptions/VolunteerCannotKickHimself.java @@ -0,0 +1,7 @@ +package cat.udl.eps.softarch.demo.exceptions; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(code = HttpStatus.PRECONDITION_FAILED, reason = "No te puedes expulsar a ti mismo") +public class VolunteerCannotKickHimself extends RuntimeException { } \ No newline at end of file diff --git a/src/main/java/cat/udl/eps/softarch/demo/exceptions/VolunteerFromDifferentShelter.java b/src/main/java/cat/udl/eps/softarch/demo/exceptions/VolunteerFromDifferentShelter.java index 7ae3d42..82b7dd4 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/exceptions/VolunteerFromDifferentShelter.java +++ b/src/main/java/cat/udl/eps/softarch/demo/exceptions/VolunteerFromDifferentShelter.java @@ -2,4 +2,5 @@ import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(code = HttpStatus.PRECONDITION_FAILED, reason = "El usuario debe ser de tipo shelterVolunteer") -public class VolunteerFromDifferentShelter extends RuntimeException { } \ No newline at end of file +public class VolunteerFromDifferentShelter extends RuntimeException { } +