File: DTDParseException.java

package info (click to toggle)
libdtdparser-java 1.21a-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 400 kB
  • ctags: 393
  • sloc: java: 3,143; xml: 66; makefile: 15
file content (43 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download | duplicates (4)
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
package com.wutka.dtd;

public class DTDParseException extends java.io.IOException
{
    public String uriID = "";
    public int lineNumber;
    public int column;

    public DTDParseException()
    {
        lineNumber=-1;
        column=-1;
    }

    public DTDParseException(String message)
    {
        super(message);
        lineNumber=-1;
        column=-1;
    }

    public DTDParseException(String message, int line, int col)
    {
        super("At line "+line+", column "+col+": "+message);
        lineNumber = line;
        column = col;
    }

    public DTDParseException(String id, String message, int line, int col)
    {
        super(((null != id && id.length() > 0) ? "URI " + id + " at " : "At ")
                + "line " + line + ", column " + col + ": " + message);
        if (null != id)
            uriID = id;

        lineNumber = line;
        column = col;
    }

    public String getId() { return(uriID); }
    public int getLineNumber() { return lineNumber; }
    public int getColumn() { return column; }
}