From 3750490f07eb4161c17dd5532de6f4a0aab021e6 Mon Sep 17 00:00:00 2001 From: Alix JEUDI--LEMOINE Date: Mon, 25 Mar 2024 18:36:35 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20exception=20partie=20d=C3=A9j=C3=A0=20d?= =?UTF-8?q?=C3=A9marr=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sae/exceptions/PartyAlreadyStartedException.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/SpringBootProject/src/main/java/fr/iut/sciencequest/sae/exceptions/PartyAlreadyStartedException.java b/SpringBootProject/src/main/java/fr/iut/sciencequest/sae/exceptions/PartyAlreadyStartedException.java index cc987ea..089a428 100644 --- a/SpringBootProject/src/main/java/fr/iut/sciencequest/sae/exceptions/PartyAlreadyStartedException.java +++ b/SpringBootProject/src/main/java/fr/iut/sciencequest/sae/exceptions/PartyAlreadyStartedException.java @@ -1,2 +1,12 @@ -package fr.iut.sciencequest.sae.exceptions;public class PartyAlreadyStartedException { +package fr.iut.sciencequest.sae.exceptions; + + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(HttpStatus.FORBIDDEN) +public class PartyAlreadyStartedException extends RuntimeException { + public PartyAlreadyStartedException() { + super("Party already started"); + } }