mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-23 07:36:31 +01:00
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
|
namespace TINK.Model.Repository.Exception
|
|||
|
{
|
|||
|
public class InvalidResponseException<T> : InvalidResponseException
|
|||
|
{
|
|||
|
/// <summary> Constructs an invalid response Exception. </summary>
|
|||
|
/// <param name="p_strActionWhichFailed">Describes the action which failed.</param>
|
|||
|
/// <param name="p_oResponse">Response from copri.</param>
|
|||
|
public InvalidResponseException(string p_strActionWhichFailed, T p_oResponse)
|
|||
|
: base(string.Format(
|
|||
|
"{0}{1}",
|
|||
|
p_strActionWhichFailed,
|
|||
|
p_oResponse == null ? string.Format(" Response des Typs {0} ist null.", typeof(T).Name.ToString()) : string.Empty))
|
|||
|
{
|
|||
|
Response = p_oResponse;
|
|||
|
}
|
|||
|
|
|||
|
public T Response { get; private set; }
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Base exception for all generic invalid response exceptions.
|
|||
|
/// </summary>
|
|||
|
public class InvalidResponseException : CommunicationException
|
|||
|
{
|
|||
|
/// <summary> Prevents an invalid instance to be created. </summary>
|
|||
|
private InvalidResponseException()
|
|||
|
{ }
|
|||
|
|
|||
|
/// <summary> Constructs a invalid response execption.</summary>
|
|||
|
/// <param name="p_strMessage">Exception.</param>
|
|||
|
public InvalidResponseException(string p_strMessage) : base(p_strMessage)
|
|||
|
{ }
|
|||
|
}
|
|||
|
}
|