Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcException type exposes the following members.
Initializes a new instance of the PlcException class with default properties.
C#
public PlcException()
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.
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.
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.
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.
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
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).
Gets the according PlcStatusCode for the ErrorCode.
C#
public PlcStatusCode Code { get; }
Property Value
One of the members defined by the PlcStatusCode enumeration.
Gets the error code of the PlcException.
C#
public int ErrorCode { get; }
Property Value
The error code of the PlcException.
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
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.
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
The info
parameter is a null reference (Nothing in Visual Basic).