---
title: ExceptionExtensions
summary: API reference for ExceptionExtensions.
status: draft
owner: saif-docgen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common
reference_type: package
---

# ExceptionExtensions

Formats an exception and its full `InnerException` chain for display or for a delimited application error log. ([BR-049](../../business-rules.md#br-049-formatting-a-null-exception-yields-an-empty-string-rather-than-throwing)) through [BR-052](../../business-rules.md#br-052-an-error-log-entry-begins-with-the-innermost-exception's-message%2C-followed-by-the-sentinel-%40%23elog%23%40%2C-followed-by-the-full-report%2C-so-a-log-reader-can-split-summary-from-detail)

## Purpose
- Formats an exception and its full `InnerException` chain for display or for a delimited application error log. ([BR-049](../../business-rules.md#br-049-formatting-a-null-exception-yields-an-empty-string-rather-than-throwing)) through [BR-052](../../business-rules.md#br-052-an-error-log-entry-begins-with-the-innermost-exception's-message%2C-followed-by-the-sentinel-%40%23elog%23%40%2C-followed-by-the-full-report%2C-so-a-log-reader-can-split-summary-from-detail)

## Context
- Namespace: `SAIF.Common.Extensions`
- Assembly/package: `SAIF.Framework.Common`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| ErrorLogMessageString | `public const string ErrorLogMessageString = "@#ELOG#@"` | Delimiter token inserted between chained exception messages in the error-log format. |
| GetFullFormattedException(this Exception exception, bool includeStackTrace) | `public static string GetFullFormattedException(this Exception exception, bool includeStackTrace)` | Renders the exception and every inner exception's message (and optionally stack trace) as a single human-readable block. ([BR-049](../../business-rules.md#br-049-formatting-a-null-exception-yields-an-empty-string-rather-than-throwing), [BR-050](<../../business-rules.md#br-050-exception-chains-are-reported-innermost-(root-cause)-first-by-default>), [BR-051](<../../business-rules.md#br-051-the-formatted-exception-report-renders-a-summary-block-(type%2C-message%2C-source)-for-every-exception>)) |
| GetErrorLogFormattedException(this Exception exception) | `public static string GetErrorLogFormattedException(this Exception exception)` | Renders the exception chain using `ErrorLogMessageString` as the delimiter, suited to single-line log ingestion. ([BR-052](../../business-rules.md#br-052-an-error-log-entry-begins-with-the-innermost-exception's-message%2C-followed-by-the-sentinel-%40%23elog%23%40%2C-followed-by-the-full-report%2C-so-a-log-reader-can-split-summary-from-detail)) |


## Sources
- `Common/SAIF.Common/Extensions/ExceptionExtensions.cs`
