TraceListener.Fail Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Emits error messages to the listener you create when you implement the TraceListener class.
Overloads
Fail(String) |
Emits an error message to the listener you create when you implement the TraceListener class. |
Fail(String, String) |
Emits an error message and a detailed error message to the listener you create when you implement the TraceListener class. |
Fail(String)
- Source:
- TraceListener.cs
- Source:
- TraceListener.cs
- Source:
- TraceListener.cs
Emits an error message to the listener you create when you implement the TraceListener class.
public:
virtual void Fail(System::String ^ message);
public virtual void Fail (string? message);
public virtual void Fail (string message);
abstract member Fail : string -> unit
override this.Fail : string -> unit
Public Overridable Sub Fail (message As String)
Parameters
- message
- String
A message to emit.
Remarks
The default behavior is to display the specified message in a message box when the application is running in a user-interface mode, and to the TraceListener instances in a TraceListenerCollection collection. By default, the TraceListenerCollection collection has an instance of a DefaultTraceListener. You can customize this behavior by adding a TraceListener to or removing one from the collection.
See also
- TraceListener
- DefaultTraceListener
- ConsoleTraceListener
- EventLogTraceListener
- TextWriterTraceListener
- Debug
- Trace
Applies to
Fail(String, String)
- Source:
- TraceListener.cs
- Source:
- TraceListener.cs
- Source:
- TraceListener.cs
Emits an error message and a detailed error message to the listener you create when you implement the TraceListener class.
public:
virtual void Fail(System::String ^ message, System::String ^ detailMessage);
public virtual void Fail (string? message, string? detailMessage);
public virtual void Fail (string message, string detailMessage);
abstract member Fail : string * string -> unit
override this.Fail : string * string -> unit
Public Overridable Sub Fail (message As String, detailMessage As String)
Parameters
- message
- String
A message to emit.
- detailMessage
- String
A detailed message to emit.
Remarks
The default behavior is to display the message and detailed message in a message box when the application is running in a user-interface mode, and to the TraceListener instances in a TraceListenerCollection collection. By default, the TraceListenerCollection collection has an instance of a DefaultTraceListener. You can customize this behavior by adding a TraceListener to or removing one from the collection.
See also
- TraceListener
- DefaultTraceListener
- EventLogTraceListener
- ConsoleTraceListener
- TextWriterTraceListener
- Debug
- Trace
Applies to
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par