PlcException Members

Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcException type exposes the following members.

PlcException()

Initializes a new instance of the PlcException class with default properties.

C#

public PlcException()

PlcException(PlcStatusCode)

Initializes a new instance of the PlcException class with the specified code.

C#

public PlcException(PlcStatusCode code)


Parameters

code PlcStatusCode

The PlcStatusCode upon its value the according Message is used for the new instance of the PlcException class.

PlcException(PlcStatusCode, Int32)

Initializes a new instance of the PlcException class with the specified code and socketCode.

C#

public PlcException(PlcStatusCode code, int socketCode)


Parameters

code PlcStatusCode

The PlcStatusCode upon its value the according Message is used for the new instance of the PlcException class.

socketCode Int32

The optional socket error code which is embedded into the exception message if code does refer to an exception based on a socket error.

PlcException(PlcStatusCode, Int32, Exception)

Initializes a new instance of the PlcException class with the specified code, socketCode and inner exception.

C#

public PlcException(PlcStatusCode code, int socketCode, Exception inner)


Parameters

code PlcStatusCode

The PlcStatusCode upon its value the according Message is used for the new instance of the PlcException class.

socketCode Int32

The optional socket error code which is embedded into the exception message if code does refer to an exception based on a socket error.

inner Exception

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

PlcException(PlcStatusCode, Int32, Exception, PlcType)

Initializes a new instance of the PlcException class with the specified code, socketCode, inner exception and the type affected.

C#

public PlcException(PlcStatusCode code, int socketCode, Exception inner, PlcType type)


Parameters

code PlcStatusCode

The PlcStatusCode upon its value the according Message is used for the new instance of the PlcException class.

socketCode Int32

The optional socket error code which is embedded into the exception message if code does refer to an exception based on a socket error.

inner Exception

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

type PlcType

The PlcType which was in operation while the new current exception was produced or a null reference (Nothing in Visual Basic) in case their was no specific PlcType in operation while the current exception was produced. The missleading type information of the type can be also the reason.

PlcException(SerializationInfo, StreamingContext)

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

C#

protected PlcException(SerializationInfo info, StreamingContext context)


Parameters

info Serialization.SerializationInfo

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

context Serialization.StreamingContext

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


Exceptions

ArgumentNullException

The info parameter is null reference (Nothing in Visual Basic).

Serialization.SerializationException

The class name is null reference (Nothing in Visual Basic) or HResult is zero (0).

Code

Gets the according PlcStatusCode for the ErrorCode.

C#

public PlcStatusCode Code { get; }


Property Value

PlcStatusCode

One of the members defined by the PlcStatusCode enumeration.

ErrorCode

Gets the error code of the PlcException.

C#

public int ErrorCode { get; }


Property Value

Int32

The error code of the PlcException.

SocketCode

Gets the error code of the recent performed socket operation if ErrorCode does refer to an error based on a socket operation.

C#

public int SocketCode { get; }


Property Value

Int32

The socket error code of the recent performed socket operation.

Type

Gets the PlcType which was in operation while the new current exception was produced. The missleading type information of the type can be also the reason.

C#

public PlcType Type { get; }


Property Value

PlcType

An instance of the PlcType class or a null reference (Nothing in Visual Basic) in case their was no specific PlcType in operation while the current exception was produced.

GetObjectData(SerializationInfo, StreamingContext)

Sets the Serialization.SerializationInfo with information about the exception.

C#

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)


Parameters

info Serialization.SerializationInfo

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

context Serialization.StreamingContext

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



Exceptions

ArgumentNullException

The info parameter is a null reference (Nothing in Visual Basic).