OpcException Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcException type exposes the following members.

OpcException()

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

C#

public OpcException()

OpcException(OpcContext)

Initializes a new instance of the OpcException class with default properties and the context specified.

C#

public OpcException(OpcContext context)


Parameters

context OpcContext

The OpcContext which was in use while the new OpcException was generated.

OpcException(OpcContext, OpcResult)

Initializes a new instance of the OpcException class using the context and result information specified.

C#

public OpcException(OpcContext context, OpcResult result)


Parameters

context OpcContext

The OpcContext which was in use while the new OpcException was generated.

result OpcResult

The OpcResult from that the exception information is to be retrieved.

OpcException(OpcContext, OpcStatusCode)

Initializes a new instance of the OpcException class with the specified context and code.

C#

[CLSCompliant(false)]
public OpcException(OpcContext context, OpcStatusCode code)


Parameters

context OpcContext

The OpcContext which was in use while the new OpcException was generated.

code OpcStatusCode

The OpcStatusCode upon its value the according Message is used for the new instance of the OpcException class.

OpcException(OpcContext, OpcStatusCode, Exception)

Initializes a new instance of the OpcException class with the specified context, code and inner exception.

C#

[CLSCompliant(false)]
public OpcException(OpcContext context, OpcStatusCode code, Exception inner)


Parameters

context OpcContext

The OpcContext which was in use while the new OpcException was generated.

code OpcStatusCode

The OpcStatusCode upon its value the according Message is used for the new instance of the OpcException class.

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.

OpcException(OpcContext, OpcStatusCode, String)

Initializes a new instance of the OpcException class with the context, code and message specified.

C#

[CLSCompliant(false)]
public OpcException(OpcContext context, OpcStatusCode code, string message)


Parameters

context OpcContext

The OpcContext which was in use while the new OpcException was generated.

code OpcStatusCode

The OpcStatusCode which is described by the message.

message String

The Message.

OpcException(OpcContext, OpcStatusCode, String, Exception)

Initializes a new instance of the OpcException class with the context, code, message and inner specified.

C#

[CLSCompliant(false)]
public OpcException(OpcContext context, OpcStatusCode code, string message, Exception inner)


Parameters

context OpcContext

The OpcContext which was in use while the new OpcException was generated.

code OpcStatusCode

The OpcStatusCode which is described by the message.

message String

The Message.

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.

OpcException(OpcContext, String)

Initializes a new instance of the OpcException class with the context and message specified.

C#

public OpcException(OpcContext context, string message)


Parameters

context OpcContext

The OpcContext which was in use while the new OpcException was generated.

message String

The Message.

OpcException(OpcResult)

Initializes a new instance of the OpcException class using the result information specified.

C#

public OpcException(OpcResult result)


Parameters

result OpcResult

The OpcResult from that the exception information is to be retrieved.

OpcException(OpcStatusCode)

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

C#

[CLSCompliant(false)]
public OpcException(OpcStatusCode code)


Parameters

code OpcStatusCode

The OpcStatusCode upon its value the according Message is used for the new instance of the OpcException class.

OpcException(OpcStatusCode, Exception)

Initializes a new instance of the OpcException class with the specified code and inner exception.

C#

[CLSCompliant(false)]
public OpcException(OpcStatusCode code, Exception inner)


Parameters

code OpcStatusCode

The OpcStatusCode upon its value the according Message is used for the new instance of the OpcException class.

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.

OpcException(OpcStatusCode, String)

Initializes a new instance of the OpcException class with the code and message specified.

C#

[CLSCompliant(false)]
public OpcException(OpcStatusCode code, string message)


Parameters

code OpcStatusCode

The OpcStatusCode which is described by the message.

message String

The Message.

OpcException(OpcStatusCode, String, Exception)

Initializes a new instance of the OpcException class with the code, message and inner exception specified.

C#

[CLSCompliant(false)]
public OpcException(OpcStatusCode code, string message, Exception inner)


Parameters

code OpcStatusCode

The OpcStatusCode which is described by the message.

message String

The Message.

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.

OpcException(SerializationInfo, StreamingContext)

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

C#

protected OpcException(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).

Serialization.SerializationException

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

OpcException(String)

Initializes a new instance of the OpcException class with the message specified.

C#

public OpcException(string message)


Parameters

message String

The Message.

Code

Gets the according OpcStatusCode for the ErrorCode.

C#

[CLSCompliant(false)]
public OpcStatusCode Code { get; }


Property Value

OpcStatusCode

One of the members defined by the OpcStatusCode enumeration.

Context

Gets the OpcContext which was in use while the current OpcException was generated.

C#

public OpcContext Context { get; }


Property Value

OpcContext

An instance of the OpcContext which was used to store context sensitive data and configuration while the current OpcException was generated.



Remarks

The OpcContext instance is at least Empty.

Data

Gets a collection of key/value pairs that provide additional user-defined information about the exception.

C#

public override IDictionary Data { get; }


Property Value

IDictionary

An object that implements the IDictionary interface and contains a collection of user-defined key/value pairs. The default is an empty collection.

ErrorCode

Gets the error code of the OpcException.

C#

[CLSCompliant(false)]
public uint ErrorCode { get; }


Property Value

UInt32

The error code of the OpcException.

Gets or sets a link to the help file associated with this exception.

C#

public override string HelpLink { get; set; }


Property Value

String

The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Message

Gets a message that describes the current exception.

C#

public override string Message { get; }


Property Value

String

The error message that explains the reason for the exception.

Result

Gets the result information associated with the exception.

C#

public OpcResult Result { get; }


Property Value

OpcResult

An instance of the OpcResult class from that the exception has been initialized.

Source

Gets or sets the name of the application or the object that causes the error.

C#

public override string Source { get; set; }


Property Value

String

The name of the application or the object that causes the error.

StackTrace

Gets a string representation of the immediate frames on the call stack.

C#

public override string StackTrace { get; }


Property Value

String

A string that describes the immediate frames of the call stack.

GetBaseException()

Returns the System.Exception that is the root cause of one or more subsequent exceptions.

C#

public override Exception GetBaseException()


Returns

Exception

The first exception thrown in a chain of exceptions.

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).

ToString()

C#

public override string ToString()


Returns

String