Class ExceptionUtility
Utility class for dealing with Exception and IErrorMetadata objects.
public static class ExceptionUtility
- Inheritance
-
ExceptionUtility
- Inherited Members
Methods
CombineMessages(IErrorMetadata)
Combines multiple levels of messages into a single message.
public static string CombineMessages(IErrorMetadata errorMetadata)
Parameters
errorMetadataIErrorMetadataThe error metadata from which to get the messages.
Returns
- string
The combined string.
CombineStackTraces(IErrorMetadata)
Combines multiple levels of stack traces into a single stack trace.
public static string? CombineStackTraces(IErrorMetadata errorMetadata)
Parameters
errorMetadataIErrorMetadataThe error metadata from which to get the stack traces.
Returns
- string
The combined string.
ExtractMetadata(Exception)
Unwraps exceptions and their inner exceptions.
public static (string?[] ExceptionTypes, string[] Messages, string?[] StackTraces, int[] ExceptionParentIndices, FailureCause Cause) ExtractMetadata(Exception ex)
Parameters
exExceptionThe exception to be converted.
Returns
- (string[] ExceptionTypes, string[] Messages, string[] StackTraces, int[] ExceptionParentIndices, FailureCause Cause)
The error metadata.