com.prosysopc.ua
Class StatusException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.prosysopc.ua.UaException
              extended by com.prosysopc.ua.StatusException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MethodCallStatusException

public class StatusException
extends UaException

An operation level exception. The exception is raised when a read or write operation to an OPC UA server returns a status code of bad quality. Read the status code for the status and DiagnosticInfo for additional diagnostics, provided by the server. Note that the diagnostics are only returned, when requested by the client application (by defining Server.OperationDiagnosticMask).

See Also:
UaClient, StatusCodes, Serialized Form

Constructor Summary
StatusException(org.opcfoundation.ua.common.ServiceFaultException e)
          Creates a new StatusException from a ServiceFaultException
StatusException(org.opcfoundation.ua.common.ServiceResultException e)
          Creates a new StatusException from an ServiceResultException
StatusException(org.opcfoundation.ua.builtintypes.StatusCode statusCode)
          Creates a new StatusException.
StatusException(org.opcfoundation.ua.builtintypes.StatusCode statusCode, org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo)
           
StatusException(org.opcfoundation.ua.builtintypes.StatusCode statusCode, Throwable cause)
          Creates a new StatusException.
StatusException(String msg)
          Creates a new StatusException with StatusCode = Bad_UnexpectedError.
StatusException(String msg, org.opcfoundation.ua.common.ServiceFaultException e)
          Creates a new StatusException with a custom message and fault
StatusException(String msg, org.opcfoundation.ua.common.ServiceResultException e)
          Creates a new StatusException with a custom message and exception.
StatusException(String msg, org.opcfoundation.ua.builtintypes.StatusCode statusCode)
          Creates a new StatusException with a custom message and status code.
StatusException(String msg, org.opcfoundation.ua.builtintypes.StatusCode statusCode, org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo, Throwable cause)
          Creates a new StatusException.
StatusException(String msg, org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode)
          Creates a new StatusException.
StatusException(String msg, org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode, org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo, Throwable cause)
          Creates a new StatusException.
StatusException(org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode)
          Creates a new StatusException.
StatusException(org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode, org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo)
          Creates a new StatusException with a status code and diagnostics
StatusException(org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode, Throwable cause)
          Creates a new StatusException.
 
Method Summary
 org.opcfoundation.ua.builtintypes.DiagnosticInfo getDiagnosticInfo()
          The diagnostics of the error.
 org.opcfoundation.ua.builtintypes.StatusCode getStatusCode()
          The status code of the error.
static org.opcfoundation.ua.builtintypes.DiagnosticInfo toDiagnosticInfo(org.opcfoundation.ua.core.ServiceFault serviceFault)
          Get the diagnotsics from a service fault.
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatusException

public StatusException(org.opcfoundation.ua.common.ServiceFaultException e)
Creates a new StatusException from a ServiceFaultException

Parameters:
e - the fault exception

StatusException

public StatusException(org.opcfoundation.ua.common.ServiceResultException e)
Creates a new StatusException from an ServiceResultException

Parameters:
e - the exception

StatusException

public StatusException(org.opcfoundation.ua.builtintypes.StatusCode statusCode)
Creates a new StatusException.

Parameters:
statusCode - The error status code defining the actual service call error.

StatusException

public StatusException(org.opcfoundation.ua.builtintypes.StatusCode statusCode,
                       org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo)
Parameters:
statusCode -
diagnosticInfo -

StatusException

public StatusException(org.opcfoundation.ua.builtintypes.StatusCode statusCode,
                       Throwable cause)
Creates a new StatusException.

Parameters:
statusCode - The error status code defining the actual service call error.
cause - The original exception.

StatusException

public StatusException(String msg)
Creates a new StatusException with StatusCode = Bad_UnexpectedError.

Parameters:
msg - Error message.

StatusException

public StatusException(String msg,
                       org.opcfoundation.ua.common.ServiceFaultException e)
Creates a new StatusException with a custom message and fault

Parameters:
msg - Error message.
e - the fault exception, used to initialize the status code and diagnostics

StatusException

public StatusException(String msg,
                       org.opcfoundation.ua.common.ServiceResultException e)
Creates a new StatusException with a custom message and exception.

Parameters:
msg - Error message.
e - the exception

StatusException

public StatusException(String msg,
                       org.opcfoundation.ua.builtintypes.StatusCode statusCode)
Creates a new StatusException with a custom message and status code.

Parameters:
msg - Error message.
statusCode - The error status code value defining the actual service call error.

StatusException

public StatusException(String msg,
                       org.opcfoundation.ua.builtintypes.StatusCode statusCode,
                       org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo,
                       Throwable cause)
Creates a new StatusException.

Parameters:
msg - Error message.
statusCode - The error status code defining the actual service call error.
diagnosticInfo - The additional diagnostic information as returned from the server.
cause - the original exception

StatusException

public StatusException(String msg,
                       org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode)
Creates a new StatusException.

Parameters:
msg - Error message.
statusCode - The error status code value defining the actual service call error.

StatusException

public StatusException(String msg,
                       org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode,
                       org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo,
                       Throwable cause)
Creates a new StatusException.

Parameters:
msg - Error message.
statusCode - The error status code value defining the actual service call error.
cause - The original exception

StatusException

public StatusException(org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode)
Creates a new StatusException.

Parameters:
statusCode - The error status code value defining the actual service call error.

StatusException

public StatusException(org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode,
                       org.opcfoundation.ua.builtintypes.DiagnosticInfo diagnosticInfo)
Creates a new StatusException with a status code and diagnostics

Parameters:
statusCode - The error status code defining the actual service call error.
diagnosticInfo - The diagnostics

StatusException

public StatusException(org.opcfoundation.ua.builtintypes.UnsignedInteger statusCode,
                       Throwable cause)
Creates a new StatusException.

Parameters:
statusCode - The error status code defining the actual service call error.
cause - The original exception.
Method Detail

toDiagnosticInfo

public static org.opcfoundation.ua.builtintypes.DiagnosticInfo toDiagnosticInfo(org.opcfoundation.ua.core.ServiceFault serviceFault)
Get the diagnotsics from a service fault.

Parameters:
serviceFault - the fault
Returns:
the diagnosticInfo from the fault

getDiagnosticInfo

public org.opcfoundation.ua.builtintypes.DiagnosticInfo getDiagnosticInfo()
The diagnostics of the error.

Returns:
the diagnosticInfo

getStatusCode

public org.opcfoundation.ua.builtintypes.StatusCode getStatusCode()
The status code of the error.

Returns:
the statusCode

toString

public String toString()
Overrides:
toString in class Throwable


Copyright © 2018. All rights reserved.