Upravit

Sdílet prostřednictvím


RuleException Constructors

Definition

Initializes a new instance of the RuleException class.

Overloads

RuleException()

Initializes a new instance of the RuleException class.

RuleException(String)

Initializes a new instance of the RuleException class with a specified error message.

RuleException(SerializationInfo, StreamingContext)

Initializes a new instance of the RuleException class with serialized data.

RuleException(String, Exception)

Initializes a new instance of the RuleException class, with a specified error message and a reference to the inner Exception that is the cause of this Exception.

RuleException()

Initializes a new instance of the RuleException class.

public:
 RuleException();
public RuleException ();
Public Sub New ()

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error and takes into account the current system culture.

The following table shows the initial property values for an instance of RuleException.

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message A system-supplied localized description.

Applies to

RuleException(String)

Initializes a new instance of the RuleException class with a specified error message.

public:
 RuleException(System::String ^ message);
public RuleException (string message);
new System.Workflow.Activities.Rules.RuleException : string -> System.Workflow.Activities.Rules.RuleException
Public Sub New (message As String)

Parameters

message
String

The message that describes the error.

Remarks

This constructor initializes the Message property of the new instance using the message parameter.

The following table shows the initial property values for an instance of RuleException.

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The error message string.

Applies to

RuleException(SerializationInfo, StreamingContext)

Initializes a new instance of the RuleException class with serialized data.

protected:
 RuleException(System::Runtime::Serialization::SerializationInfo ^ serializeInfo, System::Runtime::Serialization::StreamingContext context);
protected RuleException (System.Runtime.Serialization.SerializationInfo serializeInfo, System.Runtime.Serialization.StreamingContext context);
new System.Workflow.Activities.Rules.RuleException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Workflow.Activities.Rules.RuleException
Protected Sub New (serializeInfo As SerializationInfo, context As StreamingContext)

Parameters

serializeInfo
SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Remarks

This constructor is called during de-serialization to reconstitute the exception object transmitted over a stream.

Applies to

RuleException(String, Exception)

Initializes a new instance of the RuleException class, with a specified error message and a reference to the inner Exception that is the cause of this Exception.

public:
 RuleException(System::String ^ message, Exception ^ ex);
public RuleException (string message, Exception ex);
new System.Workflow.Activities.Rules.RuleException : string * Exception -> System.Workflow.Activities.Rules.RuleException
Public Sub New (message As String, ex As Exception)

Parameters

message
String

The message that describes the error.

ex
Exception

The Exception that is the cause of the current Exception . If the innerException parameter is not a null reference (Nothing in Visual Basic), the current Exception is raised in a catch block that handles the inner Exception .

Remarks

An Exception that is thrown as a direct result of a previous Exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference (Nothing) if the InnerException property does not supply the inner Exception value to the constructor.

The following table shows the initial property values for an instance of RuleException.

Property Value
InnerException The inner Exception reference.
Message The error message string.

Applies to