Edit

Share via


EntityException Constructors

Definition

Initializes a new instance of the EntityException class.

Overloads

EntityException()

Initializes a new instance of the EntityException class.

EntityException(String)

Initializes a new instance of the EntityException class.

EntityException(SerializationInfo, StreamingContext)

Initializes a new instance of the EntityException class.

EntityException(String, Exception)

Initializes a new instance of the EntityException class.

Remarks

For more information about how to handle code exceptions, see Exception.

EntityException()

Initializes a new instance of the EntityException class.

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

Remarks

For more information about how to handle code exceptions, see Exception.

Applies to

EntityException(String)

Initializes a new instance of the EntityException class.

public:
 EntityException(System::String ^ message);
public EntityException (string message);
new System.Data.EntityException : string -> System.Data.EntityException
Public Sub New (message As String)

Parameters

message
String

The message that describes the error.

Remarks

For more information about how to handle code exceptions, see Exception.

Applies to

EntityException(SerializationInfo, StreamingContext)

Initializes a new instance of the EntityException class.

protected:
 EntityException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected EntityException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Data.EntityException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.EntityException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
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

For more information about how to handle code exceptions, see Exception.

Applies to

EntityException(String, Exception)

Initializes a new instance of the EntityException class.

public:
 EntityException(System::String ^ message, Exception ^ innerException);
public EntityException (string message, Exception innerException);
new System.Data.EntityException : string * Exception -> System.Data.EntityException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

Remarks

For more information about how to handle code exceptions, see Exception.

Applies to