/*
 * $Id: HttpResponseException.java,v 1.4 2007/10/30 13:42:35 marbobo Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 *
 * $Log: HttpResponseException.java,v $
 * Revision 1.4  2007/10/30 13:42:35  marbobo
 * + removed unnecessary statements
 *
 * Revision 1.3  2004/07/20 08:25:43  jonyp
 * added copyright info + cvs log
 *
 * Revision 1.2  2003/04/09 20:03:45  teng
 * *** empty log message ***
 *
 * Revision 1.1  2002/10/21 14:35:49  bigmac
 * *** empty log message ***
 *
 * Revision 1.2  2002/05/14 13:48:37  moelle
 * *** empty log message ***
 *
 * Revision 1.4  2002/02/01 15:10:17  bigmac
 * + weiteren Konstruktor
 *
 * Revision 1.3  2001/12/12 15:26:04  bigmac
 * *** empty log message ***
 *
 * Revision 1.2  2001/09/20 11:12:55  bigmac
 * +code Member
 *
 * Revision 1.1  2001/07/20 09:09:42  bigmac
 * *** empty log message ***
 *
 */

package vkc.exception;

/**
 * Exception-Klasse die bei HttpResponse-Codes != 200 verwendet werden sollte
 * <p>
 * 
 * @author bigmac
 */

public class HttpResponseException extends Exception {
    private int code = -1;
    private String url = null;

    HttpResponseException() {
    }

    public HttpResponseException(int code, String url) {
        this.code = code;
        this.url = url;
    }

    public HttpResponseException(int code, java.net.URL url) {
        this.code = code;
        this.url = url.toString();
    }

    public int getResponseCode() {
        return code;
    }

    public String getURL() {
        return url;
    }

    public String toString() {
        return getClass().getName() + ": url=" + url + " code=" + code;
    }
}
