OPC Studio User's Guide and Reference
UAServiceException Class
Members 



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace : UAServiceException Class
An exception thrown when a UA defined error occurs.
Object Model
UAServiceException ClassUAServiceResult Class
Syntax
'Declaration
 
<ComDefaultInterfaceAttribute(OpcLabs.EasyOpc.UA.ComTypes._UAServiceException)>
<ComVisibleAttribute(True)>
<GuidAttribute("83F4125E-A9CF-4071-AA2C-2D89BF13082A")>
<TypeConverterAttribute(System.ComponentModel.ExpandableObjectConverter)>
<CLSCompliantAttribute(True)>
<SerializableAttribute()>
Public Class UAServiceException 
   Inherits OpcLabs.BaseLib.Exception2
   Implements OpcLabs.BaseLib.ComTypes._Exception2, OpcLabs.BaseLib.IErrorIdProvider, OpcLabs.EasyOpc.UA.ComTypes._UAServiceException, System.Runtime.InteropServices._Exception, System.Runtime.Serialization.ISerializable 
'Usage
 
Dim instance As UAServiceException
[ComDefaultInterface(OpcLabs.EasyOpc.UA.ComTypes._UAServiceException)]
[ComVisible(true)]
[Guid("83F4125E-A9CF-4071-AA2C-2D89BF13082A")]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[CLSCompliant(true)]
[Serializable()]
public class UAServiceException : OpcLabs.BaseLib.Exception2, OpcLabs.BaseLib.ComTypes._Exception2, OpcLabs.BaseLib.IErrorIdProvider, OpcLabs.EasyOpc.UA.ComTypes._UAServiceException, System.Runtime.InteropServices._Exception, System.Runtime.Serialization.ISerializable  
[ComDefaultInterface(OpcLabs.EasyOpc.UA.ComTypes._UAServiceException)]
[ComVisible(true)]
[Guid("83F4125E-A9CF-4071-AA2C-2D89BF13082A")]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[CLSCompliant(true)]
[Serializable()]
public ref class UAServiceException : public OpcLabs.BaseLib.Exception2, OpcLabs.BaseLib.ComTypes._Exception2, OpcLabs.BaseLib.IErrorIdProvider, OpcLabs.EasyOpc.UA.ComTypes._UAServiceException, System.Runtime.InteropServices._Exception, System.Runtime.Serialization.ISerializable  
Remarks

If you want to test for a specific OPC UA error, you will find the necessary information in the ServiceResult property. In most cases, you can use the fact that there is an implicit conversion from UAServiceResult to System.Int32, and make a comparison of the ServiceResult with some value from the UACodeBits class easily.

Inheritance Hierarchy

System.Object
   System.Exception
      System.ApplicationException
         OpcLabs.BaseLib.Exception2
            OpcLabs.EasyOpc.UA.UAServiceException
               OpcLabs.EasyOpc.UA.UACallServiceException

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