Package io.github.simplexdevelopment.api
Class ServicePoolException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.simplexdevelopment.api.ServicePoolException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorDescriptionConstructs a new generic service pool exception.ServicePoolException
(@NotNull String string) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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
- Parameters:
string
- The message to be displayed when the exception is thrown.
-
ServicePoolException
- 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.
-