diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-26 12:42:38 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-26 13:10:34 -0300 |
| commit | a2b10fd494fb389e556e40134031eb86e56e11e7 (patch) | |
| tree | 08b6df8a06f2c7c15488b90d57a6d8286cd57a22 /src/Cepis/NetworkException.cs | |
| download | csharp-a2b10fd494fb389e556e40134031eb86e56e11e7.tar.gz | |
Initial importv0.1.0
Diffstat (limited to 'src/Cepis/NetworkException.cs')
| -rw-r--r-- | src/Cepis/NetworkException.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Cepis/NetworkException.cs b/src/Cepis/NetworkException.cs new file mode 100644 index 0000000..cb7ea77 --- /dev/null +++ b/src/Cepis/NetworkException.cs @@ -0,0 +1,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) + { + } +} |