summaryrefslogtreecommitdiffstats
path: root/src/Cepis/CepNotFoundException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cepis/CepNotFoundException.cs')
-rw-r--r--src/Cepis/CepNotFoundException.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Cepis/CepNotFoundException.cs b/src/Cepis/CepNotFoundException.cs
new file mode 100644
index 0000000..ced7b16
--- /dev/null
+++ b/src/Cepis/CepNotFoundException.cs
@@ -0,0 +1,27 @@
+namespace Cepis;
+
+/// <summary>
+/// The CEP is well-formed but does not exist in the DNE database.
+/// </summary>
+/// <remarks>
+/// Retrying does not help: the answer is definitive until the next fortnightly
+/// database. A batch never throws this — a CEP with no address is
+/// <see langword="null"/> at its position instead.
+/// </remarks>
+public sealed class CepNotFoundException : CepisException
+{
+ /// <summary>Create the exception with a message.</summary>
+ /// <param name="message">what went wrong</param>
+ public CepNotFoundException(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 failure underneath</param>
+ public CepNotFoundException(string message, Exception? innerException)
+ : base(message, innerException)
+ {
+ }
+}