|
|
@ -5,15 +5,9 @@ namespace CoreLibrary.Exceptions
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Exception levée lorsqu'un code incomplet est ajouté à la grille.
|
|
|
|
/// Exception levée lorsqu'un code incomplet est ajouté à la grille.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
[DataContract]
|
|
|
|
[Serializable]
|
|
|
|
public class CodeIncompletException : Exception
|
|
|
|
public class CodeIncompletException : Exception
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[DataMember]
|
|
|
|
|
|
|
|
public int CodeErreur { get; private set; } = 1000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[DataMember]
|
|
|
|
|
|
|
|
public string Details { get; private set; } = String.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Message par défaut
|
|
|
|
// Message par défaut
|
|
|
|
private const string messageDefaut = "Le code que vous essayez d'ajouter dans la grille n'est pas complet.";
|
|
|
|
private const string messageDefaut = "Le code que vous essayez d'ajouter dans la grille n'est pas complet.";
|
|
|
|
|
|
|
|
|
|
|
@ -35,17 +29,13 @@ namespace CoreLibrary.Exceptions
|
|
|
|
public CodeIncompletException(string message, Exception exception) : base(message, exception)
|
|
|
|
public CodeIncompletException(string message, Exception exception) : base(message, exception)
|
|
|
|
{ }
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
public CodeIncompletException(string message, int codeErreur, string details) : base(message)
|
|
|
|
[Obsolete("This method is obsolete. Use alternative methods for data retrieval.", DiagnosticId = "SYSLIB0051")]
|
|
|
|
{
|
|
|
|
protected CodeIncompletException(SerializationInfo info, StreamingContext contexte) : base(info, contexte) { }
|
|
|
|
CodeErreur = codeErreur;
|
|
|
|
|
|
|
|
Details = details;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected CodeIncompletException(SerializationInfo info, StreamingContext contexte)
|
|
|
|
[Obsolete("This method is obsolete. Use alternative methods for data retrieval.", DiagnosticId = "SYSLIB0051")]
|
|
|
|
: base(info.GetString("Message"), null)
|
|
|
|
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CodeErreur = info.GetInt32(nameof(CodeErreur));
|
|
|
|
base.GetObjectData(info, context);
|
|
|
|
Details = info.GetString(nameof(Details)) ?? "";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|