Package com.tailf.cdb

Class CdbExtendedException

All Implemented Interfaces:
Serializable

public class CdbExtendedException extends CdbException
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 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

      public CdbExtendedException(int extendedErrorCode, String msg)
      Parameters:
      extendedErrorCode - - One of ERRCODE_IN_USE, ERRCODE_RESOURCE_DENIED, ERRCODE_INCONSISTENT_VALUE, ERRCODE_ACCESS_DENIED, ERRCODE_DATA_MISSING, ERRCODE_INTERRUPT, ERRCODE_APPLICATION or ERRCODE_APPLICATION_INTERNAL
      msg - - informative text describing this exception
    • CdbExtendedException

      public CdbExtendedException(int extendedErrorCode, ConfNamespace appNS, String appTag, String msg)
      Parameters:
      extendedErrorCode - - One of ERRCODE_IN_USE, ERRCODE_RESOURCE_DENIED, ERRCODE_INCONSISTENT_VALUE, ERRCODE_ACCESS_DENIED, ERRCODE_DATA_MISSING, ERRCODE_INTERRUPT, ERRCODE_APPLICATION or ERRCODE_APPLICATION_INTERNAL
      appNS - - not implemented, should be null
      appTag - - not implemented, should be null
      msg - - informative text describing this exception
    • CdbExtendedException

      public CdbExtendedException(int extendedErrorCode, ConfNamespace appNS, String appTag, ConfException ex)
      Parameters:
      extendedErrorCode - - One of ERRCODE_IN_USE, ERRCODE_RESOURCE_DENIED, ERRCODE_INCONSISTENT_VALUE, ERRCODE_ACCESS_DENIED, ERRCODE_DATA_MISSING, ERRCODE_INTERRUPT, ERRCODE_APPLICATION or ERRCODE_APPLICATION_INTERNAL
      appNS - - not implemented, should be null
      appTag - - not implemented, should be null
      ex - - cause exception
  • Method Details

    • mk

      public static ConfException mk(int extendedErrorCode, ConfNamespace appNS, String appTag, ConfResponse r)
      Parameters:
      extendedErrorCode - - One of ERRCODE_IN_USE, ERRCODE_RESOURCE_DENIED, ERRCODE_INCONSISTENT_VALUE, ERRCODE_ACCESS_DENIED, ERRCODE_DATA_MISSING, ERRCODE_INTERRUPT, ERRCODE_APPLICATION or ERRCODE_APPLICATION_INTERNAL
      appNS - - not implemented, should be null
      appTag - - not implemented, should be null
      r - - cause response
      Returns:
      ConfException - the resulting exception
    • getAppNS

      public ConfNamespace getAppNS()
      Returns:
      ConfNamespace for this extended exception
    • getAppTag

      public String getAppTag()
      Returns:
      appTag for the extended exception
    • getExtendedErrorCodeString

      public String getExtendedErrorCodeString()
      Get string representation of this exception error code.
      Returns:
      String representation of the errorcode for this extended exception