Package com.tailf.cdb
Class CdbExtendedException
Object
Throwable
Exception
com.tailf.conf.ConfException
com.tailf.cdb.CdbException
com.tailf.cdb.CdbExtendedException
- All Implemented Interfaces:
Serializable
This exception is used by clients of CdbSubscription that needs to report
errors. As such it can is required to hold an extendedErrorCode and an
message. The extendedErrorCode is one of: ERRCODE_IN_USE
ERRCODE_RESOURCE_DENIED ERRCODE_INCONSISTENT_VALUE ERRCODE_ACCESS_DENIED
ERRCODE_APPLICATION ERRCODE_APPLICATION_INTERNAL ERRCODE_DATA_MISSING
ERRCODE_INTERRUPT
It can also indicate an application namespace and tag to further indicate
place for the error.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
int
-
Constructor Summary
ConstructorDescriptionCdbExtendedException
(int extendedErrorCode, ConfNamespace appNS, String appTag, ConfException ex) CdbExtendedException
(int extendedErrorCode, ConfNamespace appNS, String appTag, String msg) CdbExtendedException
(int extendedErrorCode, String msg) -
Method Summary
Modifier and TypeMethodDescriptiongetAppNS()
Get string representation of this exception error code.static ConfException
mk
(int extendedErrorCode, ConfNamespace appNS, String appTag, ConfResponse r) Methods inherited from class com.tailf.cdb.CdbException
mk, mk
Methods inherited from class com.tailf.conf.ConfException
getErrorCode, getOpaque
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERRCODE_IN_USE
public static final int ERRCODE_IN_USE- See Also:
-
ERRCODE_RESOURCE_DENIED
public static final int ERRCODE_RESOURCE_DENIED- See Also:
-
ERRCODE_INCONSISTENT_VALUE
public static final int ERRCODE_INCONSISTENT_VALUE- See Also:
-
ERRCODE_ACCESS_DENIED
public static final int ERRCODE_ACCESS_DENIED- See Also:
-
ERRCODE_APPLICATION
public static final int ERRCODE_APPLICATION- See Also:
-
ERRCODE_APPLICATION_INTERNAL
public static final int ERRCODE_APPLICATION_INTERNAL- See Also:
-
ERRCODE_DATA_MISSING
public static final int ERRCODE_DATA_MISSING- See Also:
-
ERRCODE_INTERRUPT
public static final int ERRCODE_INTERRUPT- See Also:
-
extendedErrorCode
public int extendedErrorCode
-
-
Constructor Details
-
CdbExtendedException
- Parameters:
extendedErrorCode
- - One ofERRCODE_IN_USE
,ERRCODE_RESOURCE_DENIED
,ERRCODE_INCONSISTENT_VALUE
,ERRCODE_ACCESS_DENIED
,ERRCODE_DATA_MISSING
,ERRCODE_INTERRUPT
,ERRCODE_APPLICATION
orERRCODE_APPLICATION_INTERNAL
msg
- - informative text describing this exception
-
CdbExtendedException
- Parameters:
extendedErrorCode
- - One ofERRCODE_IN_USE
,ERRCODE_RESOURCE_DENIED
,ERRCODE_INCONSISTENT_VALUE
,ERRCODE_ACCESS_DENIED
,ERRCODE_DATA_MISSING
,ERRCODE_INTERRUPT
,ERRCODE_APPLICATION
orERRCODE_APPLICATION_INTERNAL
appNS
- - not implemented, should be nullappTag
- - not implemented, should be nullmsg
- - informative text describing this exception
-
CdbExtendedException
public CdbExtendedException(int extendedErrorCode, ConfNamespace appNS, String appTag, ConfException ex) - Parameters:
extendedErrorCode
- - One ofERRCODE_IN_USE
,ERRCODE_RESOURCE_DENIED
,ERRCODE_INCONSISTENT_VALUE
,ERRCODE_ACCESS_DENIED
,ERRCODE_DATA_MISSING
,ERRCODE_INTERRUPT
,ERRCODE_APPLICATION
orERRCODE_APPLICATION_INTERNAL
appNS
- - not implemented, should be nullappTag
- - not implemented, should be nullex
- - cause exception
-
-
Method Details
-
mk
public static ConfException mk(int extendedErrorCode, ConfNamespace appNS, String appTag, ConfResponse r) - Parameters:
extendedErrorCode
- - One ofERRCODE_IN_USE
,ERRCODE_RESOURCE_DENIED
,ERRCODE_INCONSISTENT_VALUE
,ERRCODE_ACCESS_DENIED
,ERRCODE_DATA_MISSING
,ERRCODE_INTERRUPT
,ERRCODE_APPLICATION
orERRCODE_APPLICATION_INTERNAL
appNS
- - not implemented, should be nullappTag
- - not implemented, should be nullr
- - cause response- Returns:
- ConfException - the resulting exception
-
getAppNS
- Returns:
- ConfNamespace for this extended exception
-
getAppTag
- Returns:
- appTag for the extended exception
-
getExtendedErrorCodeString
Get string representation of this exception error code.- Returns:
- String representation of the errorcode for this extended exception
-