Build Component UtilitiesGet Exception Message Method
This is used to get the message strings from an exception and any of its inner exceptions
Definition
Namespace: Sandcastle.Core.BuildAssembler
Assembly: Sandcastle.Core (in Sandcastle.Core.dll) Version: 2026.1.20.0
The exception message along with any inner exception messages
Assembly: Sandcastle.Core (in Sandcastle.Core.dll) Version: 2026.1.20.0
C#
public static string GetExceptionMessage(
this Exception exception
)VB
<ExtensionAttribute>
Public Shared Function GetExceptionMessage (
exception As Exception
) As StringC++
public:
[ExtensionAttribute]
static String^ GetExceptionMessage(
Exception^ exception
)F#
[<ExtensionAttribute>]
static member GetExceptionMessage :
exception : Exception -> string Parameters
- exception Exception
- The exception from which to get the message
Return Value
StringThe exception message along with any inner exception messages
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Exception. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
XmlException and XsltException messages will be returned with
line number, line position, and source URI information.
Exceptions
| ArgumentNullException | This is thrown if the exception argument is null |