From fafe2d9d9b20e979b41f7e0b56c90ff6d44ead19 Mon Sep 17 00:00:00 2001 From: jboinembalome Date: Thu, 25 Feb 2021 09:02:34 +0100 Subject: [PATCH] Ajout des exceptions pour les participations aux formations --- ...ipationFormationIncompatibleIdException.cs | 40 +++++++++++++++++++ .../ParticipationFormationInvalidException.cs | 40 +++++++++++++++++++ ...ParticipationFormationNotFoundException.cs | 40 +++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 EPAServeur/Exceptions/ParticipationFormationIncompatibleIdException.cs create mode 100644 EPAServeur/Exceptions/ParticipationFormationInvalidException.cs create mode 100644 EPAServeur/Exceptions/ParticipationFormationNotFoundException.cs diff --git a/EPAServeur/Exceptions/ParticipationFormationIncompatibleIdException.cs b/EPAServeur/Exceptions/ParticipationFormationIncompatibleIdException.cs new file mode 100644 index 0000000..f29f788 --- /dev/null +++ b/EPAServeur/Exceptions/ParticipationFormationIncompatibleIdException.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 participation à une formation avec les données à mettre à jour et l'id de la participation à une formation dans la base de données sont différents + /// + public class ParticipationFormationIncompatibleIdException : Exception + { + /// + /// Initialise une nouvelle instance de la classe class. + /// + public ParticipationFormationIncompatibleIdException() + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + public ParticipationFormationIncompatibleIdException(string message) : base(message) + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + /// + public ParticipationFormationIncompatibleIdException(string message, Exception inner) : base(message, inner) + { + + } + } +} diff --git a/EPAServeur/Exceptions/ParticipationFormationInvalidException.cs b/EPAServeur/Exceptions/ParticipationFormationInvalidException.cs new file mode 100644 index 0000000..3dde66b --- /dev/null +++ b/EPAServeur/Exceptions/ParticipationFormationInvalidException.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 participation formation est invalide + /// + public class ParticipationFormationInvalidException : Exception + { + /// + /// Initialise une nouvelle instance de la classe class. + /// + public ParticipationFormationInvalidException() + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + public ParticipationFormationInvalidException(string message) : base(message) + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + /// + public ParticipationFormationInvalidException(string message, Exception inner) : base(message, inner) + { + + } + } +} diff --git a/EPAServeur/Exceptions/ParticipationFormationNotFoundException.cs b/EPAServeur/Exceptions/ParticipationFormationNotFoundException.cs new file mode 100644 index 0000000..96bbaaf --- /dev/null +++ b/EPAServeur/Exceptions/ParticipationFormationNotFoundException.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 participation à une formation n'a pas été trouvée + /// + public class ParticipationFormationNotFoundException : Exception + { + /// + /// Initialise une nouvelle instance de la classe class. + /// + public ParticipationFormationNotFoundException() + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + public ParticipationFormationNotFoundException(string message) : base(message) + { + + } + + /// + /// Initialise une nouvelle instance de la classe class. + /// + /// + /// + public ParticipationFormationNotFoundException(string message, Exception inner) : base(message, inner) + { + + } + } +}