Method Create
- Namespace
- MailFathom.Application.Jobs
- Assembly
- MailFathom.Application.dll
Create(JobFailureClassification, string)
States what one failed attempt records against its job.
public static JobFailureRecord Create(JobFailureClassification classification, string reason)
Parameters
classificationJobFailureClassificationWhether repeating the work could succeed.
reasonstringThe operator-safe name of what failed, free of mail content.
Returns
- JobFailureRecord
The record the job's row keeps.
Remarks
A reason longer than the column allows is shortened rather than refused. It is composed here from a type name and a code, so the bound is unreachable in practice, and failing the one write whose purpose is to record a failure would leave the job held until its lease ran out with nothing said about why.
Exceptions
- ArgumentException
Thrown when
reasonis blank.- ArgumentOutOfRangeException
Thrown when
classificationis not a defined member.