WarningException
Class
Definition
Specifies an exception that is handled as a warning instead of an error.
public class WarningException : SystemException
- Inheritance
Inherited Members
System.Exception
System.Object
Examples
The following code example shows how to catch a warning and interpret its warning message.
WarningException^ myEx = gcnew WarningException( "This is a warning" );
Console::WriteLine( myEx->Message );
Console::WriteLine( myEx->ToString() );
WarningException myEx=new WarningException("This is a warning");
Console.WriteLine(myEx.Message);
Console.WriteLine(myEx.ToString());
Dim myEx As New WarningException("This is a warning")
Console.WriteLine(myEx.Message)
Console.WriteLine(myEx.ToString())
Remarks
If this exception is not caught, it is presented to the user as a warning message. In the WarningException constructor, you can specify the Help file and Help topic to display if the user requests more information.
Constructors
| WarningException() |
Initializes a new instance of the WarningException class. |
| WarningException(String) |
Initializes a new instance of the WarningException class with the specified message and no Help file. |
| WarningException(SerializationInfo, StreamingContext) |
Initializes a new instance of the WarningException class using the specified serialization data and context. |
| WarningException(String, Exception) |
Initializes a new instance of the WarningException class with the specified detailed description and the specified exception. |
| WarningException(String, String) |
Initializes a new instance of the WarningException class with the specified message, and with access to the specified Help file. |
| WarningException(String, String, String) |
Initializes a new instance of the WarningException class with the specified message, and with access to the specified Help file and topic. |
Properties
| HelpTopic |
Gets the Help topic associated with the warning. |
| HelpUrl |
Gets the Help file associated with the warning. |
Methods
| GetObjectData(SerializationInfo, StreamingContext) |
Sets the SerializationInfo with the parameter name and additional exception information. |