ResourceNotFoundException hinzugefügt
eigene custom exception für bessere Fehlermeldung
This commit is contained in:
1 parent
109a7a9610
commit
a6063ad842
1 file changed
+9
@@ -0,0 +1,9 @@
|
||||
package de.timaldinger.einkaufsliste.Exceptions;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
|
||||
@ResponseStatus(HttpStatus.NOT_FOUND)
|
||||
public class ResourceNotFoundException extends RuntimeException {
|
||||
public ResourceNotFoundException(String resource, Object value){ super("Resource " + resource + ":"+value.toString()+" not found");}
|
||||
}
|
||||
Reference in new issue
Block a user