d2610a4b 92da fda5 0206 d2f902be14eb - akesseler/Plexdata.Utilities.Templates GitHub Wiki

TemplateWeaver.HandleException Method

Converts an exception into a string and returns it.

Namespace: Plexdata.Utilities.Formatting.Helpers
Assembly: Plexdata.Utilities.Templates (in Plexdata.Utilities.Templates.dll) Version: 1.0.0

Syntax

C#

private static string HandleException(
	this BaseToken token,
	Exception exception
)

Parameters

 

token
Type: Plexdata.Utilities.Formatting.Entities.BaseToken
The token causing the exception.
exception
Type: System.Exception
The exception that has been thrown.

Return Value

Type: String
A string with (hopefully) sufficient exception information.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type BaseToken. 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

This method converts an exception into a string and returns it. The result consists of the token Marker, of the exception type name as well as of the exception Message.

Additionally, the affected token and the whole exception is printed onto the debug output console.

See Also

Reference

TemplateWeaver Class
Plexdata.Utilities.Formatting.Helpers Namespace

⚠️ **GitHub.com Fallback** ⚠️