Skip to content
Snippets Groups Projects
Commit 2561c025 authored by Lukas Karsch's avatar Lukas Karsch
Browse files

#33 add custom exception, extended by PlantNotFoundException

parent 8b0e3401
No related branches found
No related tags found
1 merge request!17"Introduce custom "GrowBrosException" (abstract class?)"
package hdm.mi.growbros.exceptions;
public abstract class GrowBrosException extends RuntimeException {
public GrowBrosException(String message) {
super(message);
}
}
package hdm.mi.growbros.exceptions;
public class PlantNotFoundException extends RuntimeException {
public class PlantNotFoundException extends GrowBrosException {
public PlantNotFoundException(Long id) {
super(String.format("Plant with id '%d' was not found", id));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment