public class StatusException extends UaException
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).
StatusCodes,
Serialized Form| Constructor and Description |
|---|
StatusException(ServiceFaultException ex)
Creates a new StatusException from a ServiceFaultException.
|
StatusException(ServiceResultException ex)
Creates a new StatusException from an ServiceResultException.
|
StatusException(StatusCode statusCode)
Creates a new StatusException.
|
StatusException(StatusCode statusCode,
DiagnosticInfo diagnosticInfo)
Creates new StatusException having the given
StatusCode and DiagnosticInfo. |
StatusException(StatusCode statusCode,
Throwable cause)
Creates a new StatusException.
|
StatusException(String msg)
Creates a new StatusException with
StatusCodes.Bad_UnexpectedError. |
StatusException(String msg,
ServiceFaultException ex)
Creates a new StatusException with a custom message and fault.
|
StatusException(String msg,
ServiceResultException ex)
Creates a new StatusException with a custom message and exception.
|
StatusException(String msg,
StatusCode statusCode)
Creates a new StatusException with a custom message and status code.
|
StatusException(String msg,
StatusCode statusCode,
DiagnosticInfo diagnosticInfo,
Throwable cause)
Creates a new StatusException.
|
StatusException(String msg,
Throwable cause)
Creates a new StatusException with StatusCode = Bad_UnexpectedError.
|
StatusException(String msg,
UnsignedInteger statusCode)
Creates a new StatusException.
|
StatusException(String msg,
UnsignedInteger statusCode,
DiagnosticInfo diagnosticInfo,
Throwable cause)
Creates a new StatusException.
|
StatusException(UnsignedInteger statusCode)
Creates a new StatusException.
|
StatusException(UnsignedInteger statusCode,
DiagnosticInfo diagnosticInfo)
Creates a new StatusException with a status code and diagnostics.
|
StatusException(UnsignedInteger statusCode,
Throwable cause)
Creates a new StatusException.
|
| Modifier and Type | Method and Description |
|---|---|
DiagnosticInfo |
getDiagnosticInfo()
The diagnostics of the error.
|
StatusCode |
getStatusCode()
The status code of the error.
|
static DiagnosticInfo |
toDiagnosticInfo(ServiceFault serviceFault)
Get the diagnotsics from a service fault.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic StatusException(ServiceFaultException ex)
public StatusException(ServiceResultException ex)
public StatusException(StatusCode statusCode)
statusCode - The error status code defining the actual service call error.public StatusException(StatusCode statusCode, DiagnosticInfo diagnosticInfo)
StatusCode and DiagnosticInfo.public StatusException(StatusCode statusCode, Throwable cause)
statusCode - The error status code defining the actual service call error.cause - The original exception.public StatusException(String msg)
StatusCodes.Bad_UnexpectedError.public StatusException(String msg, ServiceFaultException ex)
public StatusException(String msg, ServiceResultException ex)
public StatusException(String msg, StatusCode statusCode)
msg - Error message.statusCode - The error status code value defining the actual service call error.public StatusException(String msg, StatusCode statusCode, DiagnosticInfo diagnosticInfo, Throwable cause)
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 exceptionpublic StatusException(String msg, Throwable cause)
msg - Error message.cause - nested exception causing this exceptionpublic StatusException(String msg, UnsignedInteger statusCode)
msg - Error message.statusCode - The error status code value defining the actual service call error.public StatusException(String msg, UnsignedInteger statusCode, DiagnosticInfo diagnosticInfo, Throwable cause)
msg - Error message.statusCode - The error status code value defining the actual service call error.cause - The original exceptionpublic StatusException(UnsignedInteger statusCode)
statusCode - The error status code value defining the actual service call error.public StatusException(UnsignedInteger statusCode, DiagnosticInfo diagnosticInfo)
statusCode - The error status code defining the actual service call error.diagnosticInfo - The diagnosticspublic StatusException(UnsignedInteger statusCode, Throwable cause)
statusCode - The error status code defining the actual service call error.cause - The original exception.public static DiagnosticInfo toDiagnosticInfo(ServiceFault serviceFault)
serviceFault - the faultpublic DiagnosticInfo getDiagnosticInfo()
public StatusCode getStatusCode()
Copyright © 2026. All rights reserved.