com.mathworks.mps.client

## Class MWHttpException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - com.mathworks.mps.client.MWHttpException

- All Implemented Interfaces:
    java.io.Serializable

      public class MWHttpException
      extends java.io.IOException

  Represents a failed MATLAB Production Server request originated by `MWHttpClient`. Since `MWHttpClient` uses HTTP to communicate with the server, certain server side failures result in an HTTP response status of 4XX or 5XX. These failures are reported to the client in the form of an instance of `MWHttpException`
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MWHttpException(int responseCode, java.lang.String message)` Create `MWHttpException` using HTTP response code and HTTP message, associated with a failed request.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getMessage()` Get detailed message comprising of HTTP response status and response message associated with a failed request.
    `int` | `getResponseCode()` Get HTTP response status associated with a failed request.
    `java.lang.String` | `getResponseMessage()` Get HTTP response message associated with a failed request.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

    - #### MWHttpException

          public MWHttpException(int responseCode,
                                 java.lang.String message)

      Create `MWHttpException` using HTTP response code and HTTP message, associated with a failed request.
      Parameters:
        `responseCode` - HTTP response code
        `message` - HTTP response message

  - ### Method Detail

    - #### getResponseCode

          public int getResponseCode()

      Get HTTP response status associated with a failed request.
      Returns:
        HTTP response status

    - #### getResponseMessage

          public java.lang.String getResponseMessage()

      Get HTTP response message associated with a failed request.
      Returns:
        HTTP response message

    - #### getMessage

          public java.lang.String getMessage()

      Get detailed message comprising of HTTP response status and response message associated with a failed request.
      Overrides:
        `getMessage` in class `java.lang.Throwable`
      Returns:
        Detailed message comprising of HTTP response status and response message

Copyright 2010-2022 The MathWorks, Inc.