Class ExceptionUtility
Utility classes for dealing with Exception objects.
Inherited Members
Namespace: Xunit
Assembly: xunit.runner.utility.dll
Syntax
public static class ExceptionUtility
Methods
| Improve this Doc View SourceCombineMessages(IFailureInformation)
Combines multiple levels of messages into a single message.
Declaration
public static string CombineMessages(IFailureInformation failureInfo)
Parameters
Type | Name | Description |
---|---|---|
IFailureInformation | failureInfo | The failure information from which to get the messages. |
Returns
Type | Description |
---|---|
String | The combined string. |
CombineStackTraces(IFailureInformation)
Combines multiple levels of stack traces into a single stack trace.
Declaration
public static string CombineStackTraces(IFailureInformation failureInfo)
Parameters
Type | Name | Description |
---|---|---|
IFailureInformation | failureInfo | The failure information from which to get the stack traces. |
Returns
Type | Description |
---|---|
String | The combined string. |
ConvertExceptionToFailureInformation(Exception)
Unwraps exceptions and their inner exceptions.
Declaration
public static IFailureInformation ConvertExceptionToFailureInformation(Exception ex)
Parameters
Type | Name | Description |
---|---|---|
Exception | ex | The exception to be converted. |
Returns
Type | Description |
---|---|
IFailureInformation | The failure information. |