Build an application exception detail¶
Builds a SAIF.Core.Contracts.ApplicationExceptionDetail diagnostic record carrying environment, machine, user, and formatted exception context for a caught exception, to be logged by the caller.
| Field | Value |
|---|---|
| Operation ID | OP-SFC-014 |
| Trigger | Called by Merge document ranges into one PDF step 5 and four call sites in PdfAPI\Services\ |
| Inputs | IEnvironmentService, caller page label (string), message (string), Exception |
| Outputs | ApplicationExceptionDetail |
| Primary components | PdfHelper.GetApplicationDetail |
| Entry point | PdfApi.SyncFusionCore\PdfHelper.cs |
Steps¶
- Construct
SAIF.Core.Contracts.ApplicationExceptionDetailwithApplication = "PdfApi"(hard-coded) (BR-SFC-037). - Set
EnvironmentfromenvSvc.GetApplicationTrack()—IEnvironmentServiceis a caller-injected dependency fromSAIF.Framework.Core—MachinefromEnvironment.MachineName,UserfromEnvironment.UserName, andExceptionDatefromDateTime.Now(BR-SFC-038). - Set
Pageto the supplied caller label,Messageto the supplied message, andStatetoex.GetFullFormattedException()(SAIF.Common.Extensions).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["GetApplicationDetail called<br>with envSvc, page, message, ex"]) --> Construct["Construct<br>ApplicationExceptionDetail,<br>Application = PdfApi"]
Construct --> Context["Set Environment, Machine,<br>User, ExceptionDate"]
Context --> State["Set Page, Message,<br>State = formatted exception"]
State --> Return([Return ApplicationExceptionDetail])
Failure and edge-case behavior¶
- This operation performs no I/O of its own beyond reading environment/process values; it does not
log or throw. The caller is responsible for passing the constructed detail to
ILogService.
Related documentation¶
Sources¶
PdfApi.SyncFusionCore\PdfHelper.cs