XmlWriterTraceListener.Fail(String, String) Method

Definition

Writes trace information including an error message and a detailed error message to the file or stream.

public:
 override void Fail(System::String ^ message, System::String ^ detailMessage);
public override void Fail (string? message, string? detailMessage);
public override void Fail (string message, string detailMessage);
override this.Fail : string * string -> unit
Public Overrides Sub Fail (message As String, detailMessage As String)

Parameters

message
String

The error message to write.

detailMessage
String

The detailed error message to append to the error message.

Remarks

The default behavior is to display the message and detailed message in a message box when the application is running in user-interface mode, and to the TraceListener instances in the Trace.Listeners collection. By default, the collection contains an instance of DefaultTraceListener. You can customize this behavior by adding or removing a TraceListener from the collection.

Applies to