com.h3c.sdn.adm.common.converter

## Class RestResponseErrorParser

- java.lang.Object
- - com.h3c.sdn.adm.common.converter.RestResponseErrorParser

-     public class RestResponseErrorParser
      extends Object

  Extract message and error fields from an exception in JSON format.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RestResponseErrorParser(ResponseData response)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getError()` Extract the error field from an exception in JSON format.
    `String` | `getMessage()` Extract the message filed from an exception in JSON format.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RestResponseErrorParser

          public RestResponseErrorParser(ResponseData response)
                                  throws com.fasterxml.jackson.core.JsonProcessingException,
                                         IOException

      Throws:
        `com.fasterxml.jackson.core.JsonProcessingException`
        `IOException`

  - ### Method Detail

    - #### getError

          public String getError()

      Extract the error field from an exception in JSON format.
      Returns:
        exception in string format

    - #### getMessage

          public String getMessage()

      Extract the message filed from an exception in JSON format.
      Returns:
        error message

Copyright © 2014. All Rights Reserved.