Package me.ahoo.cosid

Class CosIdException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClockBackwardsException, ClockTooManyBackwardsException, IdTypeNotSupportException, IntegerIdGenerator.IdOverflowException, MachineIdLostException, MachineIdOverflowException, MultipleIdNotSupportException, NextIdSegmentExpiredException, NotFoundIdGeneratorException, NotFoundMachineStateException, NotFoundMaxIdException, OriginalIdOverflowException, SegmentNameMissingException, TimestampOverflowException

public class CosIdException extends RuntimeException
CosId root exception for all CosId-related errors.

This is the base exception class for all exceptions thrown by the CosId library. It extends RuntimeException to indicate that these are typically unrecoverable errors that should be handled at appropriate levels in the application.

Specific exception types in the CosId library extend this class to provide more detailed error information for different failure scenarios, such as:

  • ID generation failures
  • Machine ID distribution problems
  • Configuration errors
  • Clock synchronization issues
See Also:
  • Constructor Details

    • CosIdException

      public CosIdException()
      Constructs a new CosId exception with no detail message.
    • CosIdException

      public CosIdException(String message)
      Constructs a new CosId exception with the specified detail message.
      Parameters:
      message - the detail message
    • CosIdException

      public CosIdException(String message, Throwable cause)
      Constructs a new CosId exception with the specified detail message and cause.
      Parameters:
      message - the detail message
      cause - the cause of the exception
    • CosIdException

      public CosIdException(Throwable cause)
      Constructs a new CosId exception with the specified cause.
      Parameters:
      cause - the cause of the exception
    • CosIdException

      public CosIdException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
      Constructs a new CosId exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.
      Parameters:
      message - the detail message
      cause - the cause of the exception
      enableSuppression - whether suppression is enabled or disabled
      writableStackTrace - whether the stack trace should be writable