summaryrefslogtreecommitdiffstats
path: root/src/Cepis/NetworkException.cs
blob: cb7ea774245559ec55572d7e337160e8bb2af772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
namespace Cepis;

/// <summary>
/// The request never completed: DNS, a refused connection, a timeout, TLS.
/// </summary>
/// <remarks>
/// Thrown only after every configured attempt has failed. A cancellation
/// requested by the caller is not this — that surfaces as
/// <see cref="OperationCanceledException"/>, untouched.
/// </remarks>
public sealed class NetworkException : CepisException
{
    /// <summary>Create the exception with a message.</summary>
    /// <param name="message">what went wrong</param>
    public NetworkException(string message)
        : base(message)
    {
    }

    /// <summary>Create the exception with a message and an underlying cause.</summary>
    /// <param name="message">what went wrong</param>
    /// <param name="innerException">the transport failure underneath</param>
    public NetworkException(string message, Exception? innerException)
        : base(message, innerException)
    {
    }
}