public class ErrorWithResponse
extends java.lang.Exception
implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<ErrorWithResponse> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
|
ErrorWithResponse(int statusCode,
java.lang.String jsonString) |
protected |
ErrorWithResponse(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
BraintreeError |
errorFor(java.lang.String field)
Method to extract an error for an individual field, e.g.
|
static ErrorWithResponse |
fromGraphQLJson(java.lang.String json) |
static ErrorWithResponse |
fromJson(java.lang.String json) |
java.lang.String |
getErrorResponse() |
java.util.List<BraintreeError> |
getFieldErrors() |
java.lang.String |
getMessage() |
int |
getStatusCode() |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<ErrorWithResponse> CREATOR
public ErrorWithResponse(int statusCode,
java.lang.String jsonString)
protected ErrorWithResponse(android.os.Parcel in)
public static ErrorWithResponse fromJson(java.lang.String json) throws org.json.JSONException
org.json.JSONExceptionpublic static ErrorWithResponse fromGraphQLJson(java.lang.String json)
public int getStatusCode()
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.lang.String getErrorResponse()
String.public java.util.List<BraintreeError> getFieldErrors()
public BraintreeError errorFor(java.lang.String field)
field - Name of the field desired, expected to be in camelCase.BraintreeError for the field searched, or null if not found.public java.lang.String toString()
toString in class java.lang.Throwablepublic int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable