Class HttpException

  • All Implemented Interfaces:
    java.io.Serializable

    
    public class HttpException
    extends Exception
                        

    Exception to convey HTTP status codes.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpException(int statusCode) Creates an exception with an HTTP status code and empty message.
      HttpException(int statusCode, String message) Creates an exception with an HTTP status code and a message.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getStatusCode()
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpException

        HttpException(int statusCode)
        Creates an exception with an HTTP status code and empty message.
        Parameters:
        statusCode - the status code to set.
      • HttpException

        HttpException(int statusCode, String message)
        Creates an exception with an HTTP status code and a message.
        Parameters:
        statusCode - the status code to set.
        message - the message that can be passed to an HTTP content body.