namespace TINK.Repository.Exception { public class InvalidResponseException : InvalidResponseException { /// Constructs an invalid response Exception. /// Describes the action which failed. /// Response from copri. public InvalidResponseException(string actionWhichFailed, T response) : base(string.Format( "{0}{1}", actionWhichFailed, response == null ? string.Format(" Response of type {0} is null.", typeof(T).Name.ToString()) : string.Empty)) { Response = response; } public T Response { get; private set; } } /// /// Base exception for all generic invalid response exceptions. /// public class InvalidResponseException : CommunicationException { /// Prevents an invalid instance to be created. private InvalidResponseException() { } /// Constructs a invalid response execption. /// Exception. public InvalidResponseException(string message) : base(message) { } } }