mirror of
https://github.com/PaulReichmuth/timekeep-backend.git
synced 2025-12-22 22:41:59 +00:00
introduce RacerExistsException
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
package de.pnreichmuth.timekeep_backend.exceptions;
|
||||||
|
|
||||||
|
import de.pnreichmuth.timekeep_backend.entities.Racer;
|
||||||
|
import de.pnreichmuth.timekeep_backend.entities.Team;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class RacerExistsException extends RuntimeException {
|
||||||
|
public RacerExistsException(String message, Racer racer) {
|
||||||
|
super(message);
|
||||||
|
log.warn(message, racer.getFirstName(), racer.getLastName());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package de.pnreichmuth.timekeep_backend.services;
|
package de.pnreichmuth.timekeep_backend.services;
|
||||||
|
|
||||||
import de.pnreichmuth.timekeep_backend.entities.Racer;
|
import de.pnreichmuth.timekeep_backend.entities.Racer;
|
||||||
|
import de.pnreichmuth.timekeep_backend.exceptions.RacerExistsException;
|
||||||
import de.pnreichmuth.timekeep_backend.exceptions.RacerNotFoundException;
|
import de.pnreichmuth.timekeep_backend.exceptions.RacerNotFoundException;
|
||||||
import de.pnreichmuth.timekeep_backend.exceptions.TeamNotFoundException;
|
import de.pnreichmuth.timekeep_backend.exceptions.TeamNotFoundException;
|
||||||
import de.pnreichmuth.timekeep_backend.repositories.RacerRepository;
|
import de.pnreichmuth.timekeep_backend.repositories.RacerRepository;
|
||||||
|
|||||||
Reference in New Issue
Block a user