1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.io;
18
19 import org.jdom.input.JDOMParseException;
20
21 /***
22 * Exception thrown by WireFeedInput instance if it can not parse a feed.
23 * <p>
24 * @author Elaine Chien
25 *
26 */
27 public class ParsingFeedException extends FeedException {
28
29 /***
30 * Creates a FeedException with a message.
31 * <p>
32 * @param msg exception message.
33 *
34 */
35 public ParsingFeedException(String msg) {
36 super(msg);
37 }
38
39 /***
40 * Creates a FeedException with a message and a root cause exception.
41 * <p>
42 * @param msg exception message.
43 * @param rootCause root cause exception.
44 *
45 */
46 public ParsingFeedException(String msg, Throwable rootCause) {
47 super(msg, rootCause);
48 }
49
50 /***
51 * Returns the line number of the end of the text where the
52 * parse error occurred.
53 * <p>
54 * The first line in the document is line 1.</p>
55 *
56 * @return an integer representing the line number, or -1
57 * if the information is not available.
58 */
59 public int getLineNumber() {
60 return (getCause() instanceof JDOMParseException)?
61 ((JDOMParseException)getCause()).getLineNumber(): -1;
62 }
63
64 /***
65 * Returns the column number of the end of the text where the
66 * parse error occurred.
67 * <p>
68 * The first column in a line is position 1.</p>
69 *
70 * @return an integer representing the column number, or -1
71 * if the information is not available.
72 */
73 public int getColumnNumber() {
74 return (getCause() instanceof JDOMParseException)?
75 ((JDOMParseException)getCause()).getColumnNumber(): -1;
76 }
77
78 }