Class ServiceException

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

public class ServiceException extends RuntimeException
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 Details

    • ServiceException

      public ServiceException(IService service)
      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

      public ServiceException(Throwable th)
      Parameters:
      th - The throwable that was thrown.
  • Method Details

    • supplyException

      public static Supplier<ServiceException> supplyException(IService service)
      Parameters:
      service - The service that threw the exception.
      Returns:
      A supplier that can be used in conjunction with Reactor.