Class ApiException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    NotFoundException

    @Generated(value="org.openapitools.codegen.languages.JavaJerseyServerCodegen",
               date="2022-12-02T16:45:32.397906+08:00[Asia/Shanghai]")
    public class ApiException
    extends java.lang.Exception
    The exception that can be used to store the HTTP status code returned by an API response.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ApiException​(int code, java.lang.String msg)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      Get the HTTP status code.
      • Methods inherited from class java.lang.Throwable

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

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

      • ApiException

        public ApiException​(int code,
                            java.lang.String msg)
        Constructor.
        Parameters:
        code - The HTTP status code.
        msg - The error message.
    • Method Detail

      • getCode

        public int getCode()
        Get the HTTP status code.
        Returns:
        The HTTP status code.