Skip to content

ErrorDetail

ErrorDetail is the non-throwing failure record ReportBase appends to its Errors collection when a render or distribute operation fails (BR-PRT-010). It carries a human-readable message and, optionally, the underlying exception, so callers can inspect what went wrong without the operation throwing.

Purpose

  • Represent a single captured failure from a report's Render or Distribute call
  • Preserve the original exception (when one occurred) alongside a fixed diagnostic message, so callers can distinguish "render failed" from "distribute failed" without a stack trace

Context

  • Namespace: SAIF.Services.Printing.Reporting
  • Assembly/package: SAIF.Services.Printing (embedded library, project reference)

Public members

Member Signature Purpose
Message Public ReadOnly Property Message As String The diagnostic message associated with this failure
Exception Public ReadOnly Property Exception As Exception The underlying exception that was caught, or Nothing when constructed with the message-only overload
New(message) Public Sub New(message As String) Constructs an error record with only a message, no captured exception
New(message, exception) Public Sub New(message As String, exception As Exception) Constructs an error record with both a message and the exception that was caught

Behavioral notes

  • ReportBase.Render and ReportBase.Distribute both use the fixed message "An error occurred while rendering the report." when catching a render/distribute exception, regardless of which operation actually failed.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • SAIF.Services.Printing/Reporting/ErrorDetail.vb