1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100 | package Torello.HTML.Tools.NewsSite;
/**
* Thrown by the <CODE><B>'ScrapedArticleReceiver'</B></CODE> interface, if any of the methods
* inside an implementation of interface <CODE>'ScrapedArticleReceiver'</CODE> need to throw an
* exception - then that exception <B>must be wraped</B> by this <I>(unchecked, runtime)</I>
* exception.
*
* <BR /><BR />
* <EMBED CLASS='external-html' DATA-FILE-ID=RECEIVE_EX>
* <EMBED CLASS='external-html' DATA-FILE-ID=EXPM>
*/
public class ReceiveException extends java.io.IOException
{
/** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */
public static final long serialVersionUID = 1;
/**
* This is the News Web-Site "Section" that was being processed when this
* {@code ReceiveException} was thrown.
*/
public final int sectionURLNum;
/**
* This is the {@code Vector}-index into the News Web-Site "Newspaper Article" {@code Vector}
* for the {@code Article} that was being processed by {@code ScrapedArticleReceiver} when the
* {@code ReceiveException} was thrown.
*/
public final int articleNum;
/**
* Constructs a new exception with the specified detail message, and two {@code public, final}
* integer parameters: {@code sectionURLNum} and {@code articleNum}.
*
* @param message the detail message.
*
* @param sectionURLNum This is a {@code Vector}-index pointer. It points to the News-Website
* 'Section {@code URL}' that was provided to the {@code class ScrapeURL's get(...)} method.
* Since the output/return {@code Vector} to that class is <B>parallel</B> to the input
* {@code Vector<URL> sectionURLs}, this integer also (identically) points to the output
* {@code return-Vector} location that holds the News-Paper Section that was being processed
* when this {@code ReceiveException} was thrown.
*
* @param articleNum This is also a {@code Vector}-index pointer. It points to the particular
* {@code Article} whose processing ultimately resulted in {@code ReceiveException} being
* thrown. The {@code Vector} to which this index points <I>may or may not be obvious - <B>but
* it is the {@code return-Vector} produced by the {@code class ScrapeURLs' get(...)}
* method.</I></B>
*
* @see #sectionURLNum
* @see #articleNum
*/
public ReceiveException(String message, int sectionURLNum, int articleNum)
{
super(message);
this.sectionURLNum = sectionURLNum;
this.articleNum = articleNum;
}
/**
* Constructs a new exception with the specified detail message, cause-chain throwable, and two
* {@code public, final} integer parameters: {@code sectionURLNum} and {@code articleNum}.
*
* <BR /><BR /><DIV CLASS=JDHint>
* <B STYLE='color:red;'>Note:</B> The detail message associated with cause is not
* automatically incorporated into this exception's detail message.
* </DIV>
*
* @param message The detail message (which is saved for later retrieval by the
* {@code Throwable.getMessage()} method).
*
* @param cause the cause (which is saved for later retrieval by the
* {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the
* cause is nonexistent or unknown.)
*
* @param sectionURLNum This is a {@code Vector}-index pointer. It points to the News-Website
* 'Section {@code URL}' that was provided to the {@code class ScrapeURL's get(...)} method.
* Since the output/return {@code Vector} to that class is <B>parallel</B> to the input
* {@code Vector<URL> sectionURLs}, this integer also (identically) points to the output
* {@code return-Vector} location that holds the News-Paper Section that was being processed
* when this {@code ReceiveException} was thrown.
*
* @param articleNum This is a {@code Vector}-index pointer. It points to the particular
* {@code Article} whose processing ultimately resulted in {@code ReceiveException} being
* thrown. The {@code Vector} to which this index points <I>may or may not be obvious - <B>but
* it is the {@code return-Vector} produced by the {@code class ScrapeURLs' get(...)}
* method.</I></B>
*
* @see #sectionURLNum
* @see #articleNum
*/
public ReceiveException(String message, Throwable cause, int sectionURLNum, int articleNum)
{
super(message, cause);
this.sectionURLNum = sectionURLNum;
this.articleNum = articleNum;
}
}
|