Class AnnotationHttpHandleException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
eu.cloudnetservice.driver.network.http.HttpHandleException
eu.cloudnetservice.driver.network.http.annotation.parser.AnnotationHttpHandleException
All Implemented Interfaces:
Serializable

public final class AnnotationHttpHandleException extends HttpHandleException
A stackless exception which can be thrown when processing a http handler annotation.
Since:
4.0
See Also:
  • Constructor Details

    • AnnotationHttpHandleException

      public AnnotationHttpHandleException(@NonNull @NonNull String path, @NonNull @NonNull String reason)
      Constructs a new AnnotationHttpHandleException instance.
      Parameters:
      path - the path to which the request was sent during which the handling error occurred.
      reason - the reason why the error occurred.
      Throws:
      NullPointerException - if the given path or reason is null.
    • AnnotationHttpHandleException

      public AnnotationHttpHandleException(@NonNull @NonNull String path, @NonNull @NonNull String reason, @NonNull @NonNull HttpResponseCode responseCode, byte[] responseBody)
      Constructs a new AnnotationHttpHandleException instance.
      Parameters:
      path - the path to which the request was sent during which the handling error occurred.
      reason - the reason why the error occurred.
      responseCode - the http status code to set in the response.
      responseBody - the response body to set.
      Throws:
      NullPointerException - if the given path, reason or status is null.