blob: 8257df7ab434073ea545ff51daf3cbc9c5684414 (
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
28
29
|
namespace Cepis;
/// <summary>
/// The CEP is not eight digits.
/// </summary>
/// <remarks>
/// Usually thrown <b>without</b> a request ever being made: the client checks
/// the format before going to the network, because a seven-digit CEP is the
/// caller's bug and spending a round trip for the server to say so wastes both
/// sides' time. It is also thrown when the API answers 400 to a CEP that passed
/// local validation, in which case it carries the API's own message.
/// </remarks>
public sealed class InvalidCepException : CepisException
{
/// <summary>Create the exception with a message.</summary>
/// <param name="message">what went wrong</param>
public InvalidCepException(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 InvalidCepException(string message, Exception? innerException)
: base(message, innerException)
{
}
}
|