Class BKException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BKException.BKAddEntryQuorumTimeoutException, BKException.BKBookieException, BKException.BKBookieHandleNotAvailableException, BKException.BKClientClosedException, BKException.BKDataUnknownException, BKException.BKDigestMatchException, BKException.BKDigestNotInitializedException, BKException.BKDuplicateEntryIdException, BKException.BKIllegalOpException, BKException.BKIncorrectParameterException, BKException.BKInterruptedException, BKException.BKLedgerClosedException, BKException.BKLedgerExistException, BKException.BKLedgerFencedException, BKException.BKLedgerIdOverflowException, BKException.BKLedgerRecoveryException, BKException.BKMetadataSerializationException, BKException.BKMetadataVersionException, BKException.BKNoSuchEntryException, BKException.BKNoSuchLedgerExistsException, BKException.BKNoSuchLedgerExistsOnMetadataServerException, BKException.BKNotEnoughBookiesException, BKException.BKProtocolVersionException, BKException.BKQuorumException, BKException.BKReadException, BKException.BKReplicationException, BKException.BKSecurityException, BKException.BKTimeoutException, BKException.BKTooManyRequestsException, BKException.BKUnauthorizedAccessException, BKException.BKUnclosedFragmentException, BKException.BKUnexpectedConditionException, BKException.BKWriteException, BKException.BKWriteOnReadOnlyBookieException, BKException.MetaStoreException, BKException.ZKException

public abstract class BKException extends BKException
Class the enumerates all the possible error conditions.

This class is going to be deprecate soon, please use the new class BKException

See Also:
  • Field Details

  • Constructor Details

    • BKException

      BKException(int code)
    • BKException

      BKException(int code, Throwable cause)
  • Method Details

    • create

      public static BKException create(int code)
      Create an exception from an error code.
      Parameters:
      code - return error code
      Returns:
      corresponding exception
    • getExceptionCode

      public static int getExceptionCode(Throwable t, int defaultCode)
      Extract an exception code from an BKException, or use a default if it's another type. The throwable is null, assume that no exception took place and return BKException.Code.OK.
    • getExceptionCode

      public static int getExceptionCode(Throwable t)
      Extract an exception code from an BKException, or default to unexpected exception if throwable is not a BKException.
      See Also: