PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-1-pre5/com/microstar/xml/XmlException.java

#
Java | 84 lines | 31 code | 13 blank | 40 comment | 0 complexity | 96e0a79307dfae4268542180072c3b01 MD5 | raw file
 1// XmlException.java: Simple base class for AElfred processors.
 2// NO WARRANTY! See README, and copyright below.
 3// $Id: XmlException.java 3792 2001-09-02 05:37:43Z spestov $
 4
 5package com.microstar.xml;
 6
 7
 8/**
 9  * Convenience exception class for reporting XML parsing errors.
10  * <p>This is an exception class that you can use to encapsulate all
11  * of the information from &AElig;lfred's <code>error</code> callback.
12  * This is not necessary for routine use of &AElig;lfred, but it
13  * is used by the optional <code>HandlerBase</code> class.
14  * <p>Note that the core &AElig;lfred classes do <em>not</em>
15  * use this exception.
16  * @author Copyright (c) 1998 by Microstar Software Ltd.
17  * @author written by David Megginson &lt;dmeggins@microstar.com&gt;
18  * @version 1.1
19  * @see XmlHandler#error
20  * @see HandlerBase
21  */
22public class XmlException extends Exception
23{
24  private String message;
25  private String systemId;
26  private int line;
27  private int column;
28
29
30  /**
31    * Construct a new XML parsing exception.
32    * @param message The error message from the parser.
33    * @param systemId The URI of the entity containing the error.
34    * @param line The line number where the error appeared.
35    * @param column The column number where the error appeared.
36    */
37  public XmlException (String message, String systemId, int line, int column)
38  {
39    this.message = message;
40    this.systemId = systemId;
41    this.line = line;
42    this.column = column;
43  }
44
45
46  /**
47    * Get the error message from the parser.
48    * @return A string describing the error.
49    */
50  public String getMessage ()
51  {
52    return message;
53  }
54
55
56  /**
57    * Get the URI of the entity containing the error.
58    * @return The URI as a string.
59    */
60  public String getSystemId ()
61  {
62    return systemId;
63  }
64
65
66  /**
67    * Get the line number containing the error.
68    * @return The line number as an integer.
69    */
70  public int getLine ()
71  {
72    return line;
73  }
74
75  /**
76    * Get the column number containing the error.
77    * @return The column number as an integer.
78    */
79  public int getColumn ()
80  {
81    return column;
82  }
83
84}