Improve error reporting. New error page that gives a bit more of an explanation...
[frank.git] / prod / net / jaekl / qd / http / InvalidResponseException.java
1 package net.jaekl.qd.http;
2
3 import net.jaekl.qd.QDException;
4
5 public class InvalidResponseException extends QDException {
6         private static final long serialVersionUID = 1L;
7
8         String m_url;
9         String m_method;
10         String m_response;      // first few bytes of the actual response
11         
12         public InvalidResponseException(Throwable cause, String url, String method, String response) {
13                 super(cause);
14                 
15                 m_url = url;
16                 m_method = method;
17                 m_response = response;
18         }
19         
20         public String getUrl() { return m_url; }
21         public String getMethod() { return m_method; }
22         public String getResponse() { return m_response; }
23         
24         @Override
25         public String toString() {
26                 return getClass().getName() + "; " + m_url + "/" + m_method + "=>\"" + m_response + "\""; 
27         }
28 }