public class ZigBeeException extends RuntimeException
Modifier and Type | Field and Description |
---|---|
protected int |
errorCode
The error code associated to this exception.
|
static int |
OSGI_EXISTING_ID
The error code used when another endpoint exists with the same ID.
|
static int |
OSGI_MULTIPLE_HOSTS
The error code used when several hosts exist for this PAN ID target or
HOST_PID target.
|
static int |
TIMEOUT
The error code used when the timeout of ZigBee asynchronous exchange is
reached.
|
static int |
UNKNOWN_ERROR
This error code is used if the ZigBee error returned is not covered by
this API specification.
|
protected int |
zigBeeErrorCode
The actual error code returned by the ZigBee node.
|
Constructor and Description |
---|
ZigBeeException(int errorCode,
int zigBeeErrorCode,
String errorDesc)
|
ZigBeeException(int errorCode,
String errorDesc)
Creates a ZigBeeException containing a specific
errorCode . |
ZigBeeException(String errorDesc)
Creates a ZigBeeException containing only a description, but
no error codes.
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Returns the error code.
|
int |
getZigBeeErrorCode()
Returns the potential ZigBee error code.
|
boolean |
hasZigBeeErrorCode()
Checks if this exception has a ZigBee error code.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int OSGI_EXISTING_ID
public static final int OSGI_MULTIPLE_HOSTS
public static final int TIMEOUT
public static final int UNKNOWN_ERROR
protected final int errorCode
getErrorCode()
protected final int zigBeeErrorCode
getZigBeeErrorCode()
public ZigBeeException(String errorDesc)
getErrorCode()
and getZigBeeErrorCode()
methods return the
UNKNOWN_ERROR
constant.errorDesc
- exception error description.public ZigBeeException(int errorCode, String errorDesc)
errorCode
. Using this constructor with errorCode
set to
UNKNOWN_ERROR
is equivalent to call
ZigBeeException(String)
.errorCode
- One of the error codes defined in this interface or
UNKNOWN_ERROR
if the actual error is not listed in this
interface.errorDesc
- An error description which explain the type of problem.public ZigBeeException(int errorCode, int zigBeeErrorCode, String errorDesc)
errorCode
or zigBeeErrorCode
. Using this constructor with
both the errorCode
and zigBeeErrorCode
set to
UNKNOWN_ERROR
is equivalent to call
ZigBeeException(String)
.errorCode
- One of the error codes defined in this interface or
UNKNOWN_ERROR
the actual error is not covered in this
interface.zigBeeErrorCode
- The actual status code or UNKNOWN_ERROR
if this status is unknown.errorDesc
- An error description which explain the type of problem.public int getZigBeeErrorCode()
UNKNOWN_ERROR
and the hasZigBeeErrorCode()
returns true
then the getZigBeeErrorCode()
provides the actual ZigBee error code returned by the device.public int getErrorCode()
public boolean hasZigBeeErrorCode()
ZigBeeException
convey also the actual error
code returned by the ZigBee stack.Copyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0