Improve error reporting. New error page that gives a bit more of an explanation...
[frank.git] / prod / net / jaekl / qd / http / InvalidResponseException.java
index 525772e4627789dc2e72b4c650c20f1e8f180419..5240f15d95625ea8d1b31d5da38ddcae11306672 100644 (file)
@@ -7,19 +7,22 @@ public class InvalidResponseException extends QDException {
 
        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; }
        public String getMethod() { return m_method; }
+       public String getResponse() { return m_response; }
        
        @Override
        public String toString() {
-               return getClass().getName() + "; " + m_url + "/" + m_method; 
+               return getClass().getName() + "; " + m_url + "/" + m_method + "=>\"" + m_response + "\""
        }
 }