Reference
OpcException Members
The exception that is thrown when an OPC operation has failed.
Reference
OpcException Members
- Type
- OpcException
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Inherits members from Exception.
Constructors
OpcException
| Overload | Description |
|---|---|
| OpcException() | Initializes a new instance of the OpcException class with default properties. |
| OpcException( | Initializes a new instance of the OpcException class with default properties and the context specified. |
| OpcException( | Initializes a new instance of the OpcException class with the message specified. |
| OpcException( | Initializes a new instance of the OpcException class with the context and message specified. |
| OpcException( | Initializes a new instance of the OpcException class with the specified code. |
| OpcException( | Initializes a new instance of the OpcException class with the specified context and code. |
| OpcException( | Initializes a new instance of the OpcException class with the code and message specified. |
| OpcException( | Initializes a new instance of the OpcException class with the context, code and message specified. |
| OpcException( | Initializes a new instance of the OpcException class with the code, message and inner exception specified. |
| OpcException( | Initializes a new instance of the OpcException class with the context, code, message and inner specified. |
| OpcException( | Initializes a new instance of the OpcException class with the specified code and inner exception. |
| OpcException( | Initializes a new instance of the OpcException class with the specified context, code and inner exception. |
| OpcException( | Initializes a new instance of the OpcException class using the result information specified. |
| OpcException( | Initializes a new instance of the OpcException class using the context and result information specified. |
| OpcException( | Initializes a new instance of the OpcException class with serialized data. |
OpcException()
Initializes a new instance of the OpcException class with default properties.
public OpcException()Public Sub New()OpcException(OpcContext)
Initializes a new instance of the OpcException class with default properties and the context specified.
public OpcException(OpcContext context)Public Sub New(context As OpcContext)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext which was in use while the new OpcException was generated. |
OpcException(string)
Initializes a new instance of the OpcException class with the message specified.
public OpcException(string message)Public Sub New(message As String)Parameters
| Name | Type | Description |
|---|---|---|
message | String | The Message. |
OpcException(OpcContext, string)
Initializes a new instance of the OpcException class with the context and message specified.
public OpcException(OpcContext context, string message)Public Sub New(context As OpcContext, message As String)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext which was in use while the new OpcException was generated. |
message | String | The Message. |
OpcException(OpcStatusCode)
Initializes a new instance of the OpcException class with the specified code.
[CLSCompliant(false)]
public OpcException(OpcStatusCode code)<CLSCompliant(False)>
Public Sub New(code As OpcStatusCode)Parameters
| Name | Type | Description |
|---|---|---|
code | OpcStatusCode | The OpcStatusCode upon its value the according Message is used for the new instance of the OpcException class. |
OpcException(OpcContext, OpcStatusCode)
Initializes a new instance of the OpcException class with the specified context and code.
[CLSCompliant(false)]
public OpcException(OpcContext context, OpcStatusCode code)<CLSCompliant(False)>
Public Sub New(context As OpcContext, code As OpcStatusCode)Parameters
| Name | Type | Description |
|---|---|---|
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(OpcStatusCode, string)
Initializes a new instance of the OpcException class with the code and message specified.
[CLSCompliant(false)]
public OpcException(OpcStatusCode code, string message)<CLSCompliant(False)>
Public Sub New(code As OpcStatusCode, message As String)Parameters
| Name | Type | Description |
|---|---|---|
code | OpcStatusCode | The OpcStatusCode which is described by the message. |
message | String | The Message. |
OpcException(OpcContext, OpcStatusCode, string)
Initializes a new instance of the OpcException class with the context, code and message specified.
[CLSCompliant(false)]
public OpcException(OpcContext context, OpcStatusCode code, string message)<CLSCompliant(False)>
Public Sub New(context As OpcContext, code As OpcStatusCode, message As String)Parameters
| Name | Type | Description |
|---|---|---|
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(OpcStatusCode, string, Exception)
Initializes a new instance of the OpcException class with the code, message and inner exception specified.
[CLSCompliant(false)]
public OpcException(OpcStatusCode code, string message, Exception inner)<CLSCompliant(False)>
Public Sub New(code As OpcStatusCode, message As String, inner As Exception)Parameters
| Name | Type | Description |
|---|---|---|
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 ( |
OpcException(OpcContext, OpcStatusCode, string, Exception)
Initializes a new instance of the OpcException class with the context, code, message and inner specified.
[CLSCompliant(false)]
public OpcException(
OpcContext context,
OpcStatusCode code,
string message,
Exception inner)<CLSCompliant(False)>
Public Sub New(
context As OpcContext,
code As OpcStatusCode,
message As String,
inner As Exception)Parameters
| Name | Type | Description |
|---|---|---|
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 ( |
OpcException(OpcStatusCode, Exception)
Initializes a new instance of the OpcException class with the specified code and inner exception.
[CLSCompliant(false)]
public OpcException(OpcStatusCode code, Exception inner)<CLSCompliant(False)>
Public Sub New(code As OpcStatusCode, inner As Exception)Parameters
| Name | Type | Description |
|---|---|---|
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 ( |
OpcException(OpcContext, OpcStatusCode, Exception)
Initializes a new instance of the OpcException class with the specified context, code and inner exception.
[CLSCompliant(false)]
public OpcException(OpcContext context, OpcStatusCode code, Exception inner)<CLSCompliant(False)>
Public Sub New(context As OpcContext, code As OpcStatusCode, inner As Exception)Parameters
| Name | Type | Description |
|---|---|---|
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 ( |
OpcException(OpcResult)
Initializes a new instance of the OpcException class using the result information specified.
public OpcException(OpcResult result)Public Sub New(result As OpcResult)Parameters
| Name | Type | Description |
|---|---|---|
result | OpcResult | The OpcResult from that the exception information is to be retrieved. |
OpcException(OpcContext, OpcResult)
Initializes a new instance of the OpcException class using the context and result information specified.
public OpcException(OpcContext context, OpcResult result)Public Sub New(context As OpcContext, result As OpcResult)Parameters
| Name | Type | Description |
|---|---|---|
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(SerializationInfo, StreamingContext)
Initializes a new instance of the OpcException class with serialized data.
protected OpcException(SerializationInfo info, StreamingContext context)Protected Sub New(info As SerializationInfo, context As StreamingContext)Parameters
| Name | Type | Description |
|---|---|---|
info | Serialization | The Serialization |
context | StreamingContext | The StreamingContext that contains contextual information about the source or destination. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The info parameter is a null reference ( |
| Serialization | The class name is a null reference ( |
Properties
Code
Gets the according OpcStatusCode for the ErrorCode.
[CLSCompliant(false)]
public OpcStatusCode Code { get; }<CLSCompliant(False)>
Public ReadOnly Property Code As OpcStatusCodeProperty value
One of the members defined by the OpcStatusCode enumeration.
Context
Gets the OpcContext which was in use while the current OpcException was generated.
public OpcContext Context { get; }Public ReadOnly Property Context As OpcContextProperty 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.
Data
Gets a collection of key/value pairs that provide additional user-defined information about the exception.
public override IDictionary Data { get; }Public Overrides ReadOnly Property Data As IDictionaryProperty value
An object that implements the IDictionary interface and contains a collection of user-defined key/value pairs. The default is an empty collection.
Overrides
ErrorCode
Gets the error code of the OpcException.
[CLSCompliant(false)]
public uint ErrorCode { get; }<CLSCompliant(False)>
Public ReadOnly Property ErrorCode As UIntegerProperty value
The error code of the OpcException.
HelpLink
Gets or sets a link to the help file associated with this exception.
public override string HelpLink { get; set; }Public Overrides Property HelpLink As StringProperty value
The Uniform Resource Name (URN) or Uniform Resource Locator (URL).
Overrides
Message
Gets a message that describes the current exception.
public override string Message { get; }Public Overrides ReadOnly Property Message As StringProperty value
The error message that explains the reason for the exception.
Overrides
Result
Gets the result information associated with the exception.
public OpcResult Result { get; }Public ReadOnly Property Result As OpcResultProperty value
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.
public override string Source { get; set; }Public Overrides Property Source As StringProperty value
The name of the application or the object that causes the error.
Overrides
StackTrace
Gets a string representation of the immediate frames on the call stack.
public override string StackTrace { get; }Public Overrides ReadOnly Property StackTrace As StringProperty value
A string that describes the immediate frames of the call stack.
Overrides
Methods
GetBaseException
Returns the System.Exception that is the root cause of one or more subsequent exceptions.
public override Exception GetBaseException()Public Overrides Function GetBaseException() As ExceptionReturns
The first exception thrown in a chain of exceptions.
Overrides
GetObjectData
Sets the SerializationInfo with information about the exception.
public override void GetObjectData(
SerializationInfo info,
StreamingContext context)Public Overrides Sub GetObjectData(
info As SerializationInfo,
context As StreamingContext)Parameters
| Name | Type | Description |
|---|---|---|
info | Serialization | The Serialization |
context | StreamingContext | The StreamingContext that contains contextual information about the source or destination. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The info parameter is a null reference ( |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
ToString
Creates and returns a string representation of the exception.
public override string ToString()Public Overrides Function ToString() As StringReturns
The full name of the type of the exception and its Message, followed by its StackTrace on a new line if there is one.
Overrides
Remarks
Unlike ToString(), the string does not contain the inner exceptions.

