Back to project page Android-Google-Places-API.
The source code is released under:
Copyright (c) 2013 Fuji, Goro (gfx). Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the ...
If you think the Android project Android-Google-Places-API listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.gfx.googleplaces; /* w w w. j ava 2 s. co m*/ import android.util.Log; import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; public class RequestError extends Exception { private final String reason; private final Throwable parent; private final HttpRequest request; RequestError(String reason, Throwable parent, HttpRequest request) { this.reason = reason; this.parent = parent; this.request = request; } public Throwable getParent() { return parent; } @Override public String toString() { String message = reason; if (request != null) { message += "n" + request.getRequestMethod() + " " + request.getUrl(); } if (parent != null) { message += ": " + Log.getStackTraceString(parent); } return String.format("RequestError: %s\n%s", reason, message); } }