Class XunitException
The base assert exception class
Inheritance
XunitException
Namespace: Xunit.Sdk
Assembly: xunit.assert.dll
Syntax
public class XunitException : Exception
Constructors
| Improve this Doc View SourceXunitException()
Initializes a new instance of the XunitException class.
Declaration
public XunitException()
XunitException(String)
Initializes a new instance of the XunitException class.
Declaration
public XunitException(string userMessage)
Parameters
Type | Name | Description |
---|---|---|
String | userMessage | The user message to be displayed |
XunitException(String, Exception)
Initializes a new instance of the XunitException class.
Declaration
protected XunitException(string userMessage, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
String | userMessage | The user message to be displayed |
Exception | innerException | The inner exception |
XunitException(String, String)
Initializes a new instance of the XunitException class.
Declaration
protected XunitException(string userMessage, string stackTrace)
Parameters
Type | Name | Description |
---|---|---|
String | userMessage | The user message to be displayed |
String | stackTrace | The stack trace to be displayed |
Properties
| Improve this Doc View SourceStackTrace
Gets a string representation of the frames on the call stack at the time the current exception was thrown.
Declaration
public override string StackTrace { get; }
Property Value
Type | Description |
---|---|
String | A string that describes the contents of the call stack, with the most recent method call appearing first. |
UserMessage
Gets the user message
Declaration
public string UserMessage { get; protected set; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |