OPC Studio User's Guide and Reference
OperationException Class
Members 



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.OperationModel Namespace : OperationException Class
Exceptions arising from performing operations.
Syntax
'Declaration
 
<CLSCompliantAttribute(True)>
<ComDefaultInterfaceAttribute(OpcLabs.BaseLib.OperationModel.ComTypes._OperationException)>
<ComVisibleAttribute(True)>
<GuidAttribute("82ADE793-CBA7-4859-98F6-FC846DF49ACA")>
<TypeConverterAttribute(System.ComponentModel.ExpandableObjectConverter)>
<SerializableAttribute()>
Public Class OperationException 
   Inherits OpcLabs.BaseLib.Exception2
   Implements OpcLabs.BaseLib.ComTypes._Exception2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationException, System.Runtime.InteropServices._Exception, System.Runtime.Serialization.ISerializable 
'Usage
 
Dim instance As OperationException
[CLSCompliant(true)]
[ComDefaultInterface(OpcLabs.BaseLib.OperationModel.ComTypes._OperationException)]
[ComVisible(true)]
[Guid("82ADE793-CBA7-4859-98F6-FC846DF49ACA")]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[Serializable()]
public class OperationException : OpcLabs.BaseLib.Exception2, OpcLabs.BaseLib.ComTypes._Exception2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationException, System.Runtime.InteropServices._Exception, System.Runtime.Serialization.ISerializable  
[CLSCompliant(true)]
[ComDefaultInterface(OpcLabs.BaseLib.OperationModel.ComTypes._OperationException)]
[ComVisible(true)]
[Guid("82ADE793-CBA7-4859-98F6-FC846DF49ACA")]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[Serializable()]
public ref class OperationException : public OpcLabs.BaseLib.Exception2, OpcLabs.BaseLib.ComTypes._Exception2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationException, System.Runtime.InteropServices._Exception, System.Runtime.Serialization.ISerializable  
Remarks

In general, you cannot safely prevent these exceptions from happening. Conditions external to your code can cause failures. For this reason, you should always expect that an operation can fail.

Operation exception always contains a (non-null) inner exception. This is because it is thrown as a wrapper exception by single-operation methods, but multiple-operation methods return the inner exception through their results, and therefore the inner exception is the one that actually determines the error cause.

Inheritance Hierarchy

System.Object
   System.Exception
      System.ApplicationException
         OpcLabs.BaseLib.Exception2
            OpcLabs.BaseLib.OperationModel.OperationException
               OpcLabs.EasyOpc.OperationModel.OpcException
               OpcLabs.EasyOpc.UA.OperationModel.UAException

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also