com.netease.cloud.transform
public class LegacyErrorUnmarshaller extends Object implements Unmarshaller<ServiceException,Node>
Modifier | Constructor and Description |
---|---|
|
LegacyErrorUnmarshaller()
Constructs a new unmarshaller that will unmarshall error responses as a
generic ServiceException object.
|
protected |
LegacyErrorUnmarshaller(Class<? extends ServiceException> exceptionClass)
Constructor allowing subclasses to specify a specific type of
ServiceException to instantiating when populating the exception object
with data from the error response.
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorPropertyPath(String property)
Returns the path to the specified property within an error response.
|
String |
parseErrorCode(Node in)
Returns the error code for the specified error response.
|
ServiceException |
unmarshall(Node in) |
public LegacyErrorUnmarshaller()
protected LegacyErrorUnmarshaller(Class<? extends ServiceException> exceptionClass)
exceptionClass
- The class of ServiceException to create and populate when
unmarshalling the error response.public ServiceException unmarshall(Node in) throws Exception
unmarshall
in interface Unmarshaller<ServiceException,Node>
Exception
public String parseErrorCode(Node in) throws Exception
in
- The DOM tree node containing the error response.Exception
- If any problems were encountered pulling out the error code.Copyright © 2017. All Rights Reserved.