Class Failure
- Namespace
- Cuemon.Diagnostics
- Assembly
- Cuemon.Core.dll
Represents a failure model with detailed information about an exception.
public record Failure : IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IEquatable<Failure>
- Inheritance
-
Failure
- Implements
Constructors
Failure(Exception, FaultSensitivityDetails)
Initializes a new instance of the Failure class.
public Failure(Exception exception, FaultSensitivityDetails sensitivity)
Parameters
exception
ExceptionThe Exception that represents the failure.
sensitivity
FaultSensitivityDetailsThe FaultSensitivityDetails of the fault.
Exceptions
- ArgumentNullException
Thrown when
exception
is null.
Properties
Data
Gets the data associated with the underlying exception.
public IDictionary<string, object> Data { get; }
Property Value
Message
Gets the message of the underlying exception.
public string Message { get; }
Property Value
Namespace
Gets the namespace of the underlying exception.
public string Namespace { get; }
Property Value
Source
Gets the source of the underlying exception.
public string Source { get; }
Property Value
Stack
Gets the stack trace of the underlying exception.
public IEnumerable<string> Stack { get; }
Property Value
Type
Gets the type of the underlying exception.
public string Type { get; }
Property Value
Methods
GetUnderlyingException()
Gets the underlying exception to this Failure.
public Exception GetUnderlyingException()
Returns
GetUnderlyingSensitivity()
Gets the underlying sensitivity details of this Failure.
public FaultSensitivityDetails GetUnderlyingSensitivity()
Returns
- FaultSensitivityDetails
The underlying sensitivity details of this Failure.