String m_url;
String m_method;
+ String m_response; // first few bytes of the actual response
- public InvalidResponseException(String url, String method, Throwable cause) {
+ public InvalidResponseException(Throwable cause, String url, String method, String response) {
super(cause);
m_url = url;
m_method = method;
+ m_response = response;
}
public String getUrl() { return m_url; }
@Override
public String toString() {
- return getClass().getName() + "; " + m_url + "/" + m_method;
+ return getClass().getName() + "; " + m_url + "/" + m_method + "=>\"" + m_response + "\"";
}
}