projects
/
frank.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add ability to see raw response from server when something goes wrong. (OC Transpo...
[frank.git]
/
prod
/
net
/
jaekl
/
qd
/
http
/
InvalidResponseException.java
diff --git
a/prod/net/jaekl/qd/http/InvalidResponseException.java
b/prod/net/jaekl/qd/http/InvalidResponseException.java
index 525772e4627789dc2e72b4c650c20f1e8f180419..7d0bdc85d8a21c5bff5c9877d7f9b820883fb874 100644
(file)
--- a/
prod/net/jaekl/qd/http/InvalidResponseException.java
+++ b/
prod/net/jaekl/qd/http/InvalidResponseException.java
@@
-7,12
+7,14
@@
public class InvalidResponseException extends QDException {
String m_url;
String m_method;
String m_url;
String m_method;
+ String m_response; // first few bytes of the actual response
- public InvalidResponseException(
String url, String method, Throwable cau
se) {
+ public InvalidResponseException(
Throwable cause, String url, String method, String respon
se) {
super(cause);
m_url = url;
m_method = method;
super(cause);
m_url = url;
m_method = method;
+ m_response = response;
}
public String getUrl() { return m_url; }
}
public String getUrl() { return m_url; }
@@
-20,6
+22,6
@@
public class InvalidResponseException extends QDException {
@Override
public String toString() {
@Override
public String toString() {
- return getClass().getName() + "; " + m_url + "/" + m_method;
+ return getClass().getName() + "; " + m_url + "/" + m_method
+ "=>\"" + m_response + "\""
;
}
}
}
}