mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-16 15:16:34 +01:00
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
namespace TINK.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)
|
|
{ }
|
|
}
|
|
}
|