Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcException type exposes the following members.
Initializes a new instance of the OpcException class with default properties.
C#
public OpcException()
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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).
Initializes a new instance of the OpcException class with the message
specified.
C#
public OpcException(string message)
Parameters
message
String
The Message.
Gets the according OpcStatusCode for the ErrorCode.
C#
[CLSCompliant(false)] public OpcStatusCode Code { get; }
Property Value
One of the members defined by the OpcStatusCode enumeration.
Gets the OpcContext which was in use while the current OpcException was generated.
C#
public OpcContext Context { get; }
Property Value
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.
Gets a collection of key/value pairs that provide additional user-defined information about the exception.
C#
public override IDictionary Data { get; }
Property Value
An object that implements the IDictionary interface and contains a collection of user-defined key/value pairs. The default is an empty collection.
Gets the error code of the OpcException.
C#
[CLSCompliant(false)] public uint ErrorCode { get; }
Property Value
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
The Uniform Resource Name (URN) or Uniform Resource Locator (URL).
Gets a message that describes the current exception.
C#
public override string Message { get; }
Property Value
The error message that explains the reason for the exception.
Gets or sets the name of the application or the object that causes the error.
C#
public override string Source { get; set; }
Property Value
The name of the application or the object that causes the error.
Gets a string representation of the immediate frames on the call stack.
C#
public override string StackTrace { get; }
Property Value
A string that describes the immediate frames of the call stack.
Returns the System.Exception that is the root cause of one or more subsequent exceptions.
C#
public override Exception GetBaseException()
Returns
The first exception thrown in a chain of exceptions.
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).