Table of Contents

Method GetMessage

Namespace
Ploch.CommandLine.Spectre.Output
Assembly
Ploch.CommandLine.Spectre.dll

GetMessage(TException?, IMessageFormatterProcessor?, IFormatProvider?)

Formats an exception into a human-readable message string.

public override string GetMessage(TException? message, IMessageFormatterProcessor? formatterProcessor = null, IFormatProvider? formatProvider = null)

Parameters

message TException

The exception to format. Cannot be null.

formatterProcessor IMessageFormatterProcessor

Optional formatter processor that can be used for additional formatting. Can be null.

formatProvider IFormatProvider

Unused. Exception text is already rendered, so there is nothing for a provider to format; the parameter is present only to satisfy the contract.

Returns

string

A formatted string representation of the exception including type name, message, and inner exception details if present.