01: //ParserException.java
02: //------------------------
03: //part of YaCy
04: //(C) by Michael Peter Christen; mc@anomic.de
05: //first published on http://www.anomic.de
06: //Frankfurt, Germany, 2005
07: //
08: //this file is contributed by Martin Thelian
09: //last major change: 24.04.2005
10: //
11: //This program is free software; you can redistribute it and/or modify
12: //it under the terms of the GNU General Public License as published by
13: //the Free Software Foundation; either version 2 of the License, or
14: //(at your option) any later version.
15: //
16: //This program is distributed in the hope that it will be useful,
17: //but WITHOUT ANY WARRANTY; without even the implied warranty of
18: //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19: //GNU General Public License for more details.
20: //
21: //You should have received a copy of the GNU General Public License
22: //along with this program; if not, write to the Free Software
23: //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24: //
25: //Using this software in any meaning (reading, learning, copying, compiling,
26: //running) means that you agree that the Author(s) is (are) not responsible
27: //for cost, loss of data or any harm that may be caused directly or indirectly
28: //by usage of this softare or this documentation. The usage of this software
29: //is on your own risk. The installation and usage (starting/running) of this
30: //software may allow other people or application to access your computer and
31: //any attached devices and is highly dependent on the configuration of the
32: //software which must be done by the user of the software; the author(s) is
33: //(are) also not responsible for proper configuration and usage of the
34: //software, even if provoked by documentation provided together with
35: //the software.
36: //
37: //Any changes to this file according to the GPL as documented in the file
38: //gpl.txt aside this file in the shipment you received can be done to the
39: //lines that follows this copyright notice here, but changes must not be
40: //done inside the copyright notive above. A re-distribution must contain
41: //the intact and unchanged copyright notice.
42: //Contributions and changes to the program code must be marked as such.
43:
44: package de.anomic.plasma.parser;
45:
46: import de.anomic.plasma.plasmaCrawlEURL;
47: import de.anomic.yacy.yacyURL;
48:
49: public class ParserException extends Exception {
50: private String errorCode = null;
51: private yacyURL url = null;
52:
53: private static final long serialVersionUID = 1L;
54:
55: public ParserException() {
56: super ();
57: }
58:
59: public ParserException(String message, yacyURL url) {
60: this (message, url, plasmaCrawlEURL.DENIED_PARSER_ERROR);
61: }
62:
63: public ParserException(String message, yacyURL url, String errorCode) {
64: super (message);
65: this .errorCode = errorCode;
66: this .url = url;
67: }
68:
69: public ParserException(String message, yacyURL url, Throwable cause) {
70: this (message, url, cause, plasmaCrawlEURL.DENIED_PARSER_ERROR);
71: }
72:
73: public ParserException(String message, yacyURL url,
74: Throwable cause, String errorCode) {
75: super (message, cause);
76: this .errorCode = errorCode;
77: this .url = url;
78: }
79:
80: public String getErrorCode() {
81: return this .errorCode;
82: }
83:
84: public yacyURL getURL() {
85: return this.url;
86: }
87: }
|