From 6633d5db526397c038e427b1147be807e625f6ea Mon Sep 17 00:00:00 2001 From: jboinembalome Date: Tue, 2 Mar 2021 09:21:56 +0100 Subject: [PATCH] Ajout des exceptions pour la partie demande de formation --- ...DemandeFormationIncompatibleIdException.cs | 40 +++++++++++++++++++ .../DemandeFormationInvalidException.cs | 40 +++++++++++++++++++ .../DemandeFormationNotFoundException.cs | 40 +++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 EPAServeur/Exceptions/DemandeFormationIncompatibleIdException.cs create mode 100644 EPAServeur/Exceptions/DemandeFormationInvalidException.cs create mode 100644 EPAServeur/Exceptions/DemandeFormationNotFoundException.cs diff --git a/EPAServeur/Exceptions/DemandeFormationIncompatibleIdException.cs b/EPAServeur/Exceptions/DemandeFormationIncompatibleIdException.cs new file mode 100644 index 0000000..77be02a --- /dev/null +++ b/EPAServeur/Exceptions/DemandeFormationIncompatibleIdException.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace EPAServeur.Exceptions +{ + /// + /// Exception qui est levée lorsque l'id de la demande de formation avec les données à mettre à jour et l'id de la demande de formation dans la base de données sont différents + /// + public class DemandeFormationIncompatibleIdException : Exception + { + /// + /// Initialise une nouvelle instance de la classe class. + /// + public DemandeFormationIncompatibleIdException() + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + public DemandeFormationIncompatibleIdException(string message) : base(message) + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + /// + public DemandeFormationIncompatibleIdException(string message, Exception inner) : base(message, inner) + { + + } + } +} diff --git a/EPAServeur/Exceptions/DemandeFormationInvalidException.cs b/EPAServeur/Exceptions/DemandeFormationInvalidException.cs new file mode 100644 index 0000000..a964eda --- /dev/null +++ b/EPAServeur/Exceptions/DemandeFormationInvalidException.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace EPAServeur.Exceptions +{ + /// + /// Exception qui est levée lorsqu'une demande de formation est invalide + /// + public class DemandeFormationInvalidException : Exception + { + /// + /// Initialise une nouvelle instance de la classe class. + /// + public DemandeFormationInvalidException() + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + public DemandeFormationInvalidException(string message) : base(message) + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + /// + public DemandeFormationInvalidException(string message, Exception inner) : base(message, inner) + { + + } + } +} diff --git a/EPAServeur/Exceptions/DemandeFormationNotFoundException.cs b/EPAServeur/Exceptions/DemandeFormationNotFoundException.cs new file mode 100644 index 0000000..1528bcd --- /dev/null +++ b/EPAServeur/Exceptions/DemandeFormationNotFoundException.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace EPAServeur.Exceptions +{ + /// + /// Exception qui est levée lorsqu'une demande de formation n'a pas été trouvée + /// + public class DemandeFormationNotFoundException : Exception + { + /// + /// Initialise une nouvelle instance de la classe class. + /// + public DemandeFormationNotFoundException() + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + public DemandeFormationNotFoundException(string message) : base(message) + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + /// + public DemandeFormationNotFoundException(string message, Exception inner) : base(message, inner) + { + + } + } +}