mirror of
https://github.com/PaulReichmuth/timekeep-backend.git
synced 2025-12-22 22:41:59 +00:00
create station exceptions
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
package de.pnreichmuth.timekeep_backend.exceptions;
|
||||||
|
|
||||||
|
import de.pnreichmuth.timekeep_backend.entities.Station;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class StationExistsException extends RuntimeException {
|
||||||
|
public StationExistsException(String message, Station station) {
|
||||||
|
super(message);
|
||||||
|
log.warn(message, station.getName(), station.getLocation());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package de.pnreichmuth.timekeep_backend.exceptions;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class StationNotFoundException extends RuntimeException {
|
||||||
|
public StationNotFoundException(String message) {
|
||||||
|
super(message);
|
||||||
|
log.error(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user