Package io.github.simplexdevelopment.api
Class ServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.simplexdevelopment.api.ServiceException
- All Implemented Interfaces:
Serializable
This class is used to represent a service exception.
When a
IService
is called that has not been registered with a ServicePool
,
this exception will be thrown.- See Also:
-
Constructor Summary
ConstructorDescriptionServiceException
(IService service) Constructs a new service exception which states the service is not present within any service pools. -
Method Summary
Modifier and TypeMethodDescriptionstatic Supplier<ServiceException>
supplyException
(IService service) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ServiceException
Constructs a new service exception which states the service is not present within any service pools.- Parameters:
service
- The service that threw the exception.
-
ServiceException
- Parameters:
th
- The throwable that was thrown.
-
-
Method Details
-
supplyException
- Parameters:
service
- The service that threw the exception.- Returns:
- A supplier that can be used in conjunction with Reactor.
-