public class GoogleJsonError
extends com.google.api.client.json.GenericJson
| Modifier and Type | Class and Description |
|---|---|
static class |
GoogleJsonError.ErrorInfo
Detailed error information.
|
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
GoogleJsonError() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Returns the HTTP status code of this response or
null for none. |
List<GoogleJsonError.ErrorInfo> |
getErrors()
Returns the list of detailed errors or
null for none. |
String |
getMessage()
Returns the human-readable explanation of the error or
null for none. |
static GoogleJsonError |
parse(com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpResponse response)
Parses the given error HTTP response using the given JSON factory.
|
void |
setCode(int code)
Sets the HTTP status code of this response or
null for none. |
void |
setErrors(List<GoogleJsonError.ErrorInfo> errors)
Sets the list of detailed errors or
null for none. |
void |
setMessage(String message)
Sets the human-readable explanation of the error or
null for none. |
clone, getFactory, setFactory, toPrettyString, toStringentrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, set, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, valuespublic static GoogleJsonError parse(com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpResponse response) throws IOException
jsonFactory - JSON factoryresponse - HTTP responseIllegalArgumentException - if content type is not Json.MEDIA_TYPE or if
expected "data" or "error" key is not foundIOExceptionpublic final List<GoogleJsonError.ErrorInfo> getErrors()
null for none.public final void setErrors(List<GoogleJsonError.ErrorInfo> errors)
null for none.public final int getCode()
null for none.public final void setCode(int code)
null for none.public final String getMessage()
null for none.public final void setMessage(String message)
null for none.Copyright © 2010-2013 Google. All Rights Reserved.