Class ServicePoolException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.simplexdevelopment.api.ServicePoolException
All Implemented Interfaces:
Serializable

public class ServicePoolException extends RuntimeException
This class is used to represent a service pool exception. This exception is thrown when a ServicePool is not found, when ServicePool.queueService(IService) is called but the service is not registered with this pool, or if the service pool is empty and ServicePool.queueServices() is called.
See Also:
  • Constructor Details

    • ServicePoolException

      public ServicePoolException()
      Constructs a new generic service pool exception. This will be thrown when a service attempts to execute without an associated service pool.
    • ServicePoolException

      public ServicePoolException(@NotNull @NotNull String string)
      Parameters:
      string - The message to be displayed when the exception is thrown.
    • ServicePoolException

      public ServicePoolException(Throwable ex)
      Parameters:
      ex - The exception to be thrown.
  • Method Details

    • supplyException

      @Contract(pure=true) @NotNull public static @NotNull Supplier<ServicePoolException> supplyException()
      Returns:
      A supplier which can be used in conjunction with Reactor.