Package com.emc.documentum.rest.error

# Class RestServiceException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.emc.documentum.rest.error.RestServiceException

All Implemented Interfaces:
  `Serializable`

public class RestServiceException extends Exception
The REST service exception class transforms a `DfException` or a `DfRuntimeException` into a REST error representation. It reads the DFC to REST error message mapping from a mapping JSON file and outputs the `RestError`. Please see `ClasspathErrorMappingLoader` for the details of the error message mapping.

See Also:
  - `ClasspathErrorMappingLoader`
  - `RestError`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RestServiceException(com.documentum.fc.common.DfException dfException, String controller, String method)`
  Constructor
  `RestServiceException(com.documentum.fc.common.DfRuntimeException dfrException, String controller, String method)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `RestError`
  `toError()`
  Build the REST error instance from a DFC exception.

  ### 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 Details

  - ### RestServiceException

    public RestServiceException(com.documentum.fc.common.DfException dfException, String controller, String method)
    Constructor
    Parameters:
      `dfException` - original DFC exception
      `controller` - controller name
      `method` - method name

  - ### RestServiceException

    public RestServiceException(com.documentum.fc.common.DfRuntimeException dfrException, String controller, String method)
    Constructor
    Parameters:
      `dfrException` - original DFC exception
      `controller` - controller name
      `method` - method name

- ## Method Details

  - ### toError

    public RestError toError()
    Build the REST error instance from a DFC exception.
    Returns:
      an REST error instance