create station exceptions

This commit is contained in:
2025-12-19 15:39:24 +01:00
parent 30fc023869
commit 70e64b153a
2 changed files with 23 additions and 0 deletions

View File

@@ -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());
}
}

View File

@@ -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);
}
}