Table of Contents

Class ContactRecordInvalidException

Namespace
MailFathom.Application.Contacts.Failures
Assembly
MailFathom.Application.dll

The failure raised when the record a write states is not one the contact book admits.

public sealed class ContactRecordInvalidException : MailFathomException, ISerializable
Inheritance
ContactRecordInvalidException
Implements
Inherited Members

Remarks

Every rule is checked before the book is reached, because what a caller has to be told is which rule it broke, and the domain's own guards say that by naming a constructor parameter. The two rules only the domain can state — which characters carry no glyph — are translated here into sentences of their own rather than published as the exception's text.

No value a contact record carries reaches this message. A name, an address, and a note are personal data about a third party, so a malformed address is reported as an address that is not usable rather than echoed into a client-readable result and the log line beside it. Every limit named here comes from this system.

Properties

ErrorCode

Gets the stable code identifying this failure to a boundary that must report it without naming a type.

Methods

NoAddress()

Refuses a record carrying no address.

NoDisplayName()

Refuses a record that names no display name.

NotADisplayName(Exception)

Refuses a display name the book cannot hold.

NotANote(Exception)

Refuses a note the book cannot hold.

NotAnAddress()

Refuses text that is not an address the book can hold.

PreferredAddressNotHeld()

Refuses a record whose preferred address is not one it holds.

TooManyAddresses()

Refuses a record naming more addresses than one person may be recorded as using.