home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 July / PCpro_2005_07.ISO / files / wintools / FullSync / FullSyncInstaller.exe / net / n3 / nanoxml / XMLException.class (.txt) < prev    next >
Encoding:
Java Class File  |  2005-03-08  |  1.7 KB  |  76 lines

  1. package net.n3.nanoxml;
  2.  
  3. import java.io.PrintStream;
  4. import java.io.PrintWriter;
  5.  
  6. public class XMLException extends Exception {
  7.    private String systemID;
  8.    private int lineNr;
  9.    private Exception encapsulatedException;
  10.  
  11.    public XMLException(String var1) {
  12.       this((String)null, -1, (Exception)null, var1, false);
  13.    }
  14.  
  15.    public XMLException(Exception var1) {
  16.       this((String)null, -1, var1, var1.getMessage(), false);
  17.    }
  18.  
  19.    public XMLException(String var1, int var2, Exception var3) {
  20.       this(var1, var2, var3, "Nested Exception", true);
  21.    }
  22.  
  23.    public XMLException(String var1, int var2, String var3) {
  24.       this(var1, var2, (Exception)null, var3, true);
  25.    }
  26.  
  27.    public XMLException(String var1, int var2, Exception var3, String var4, boolean var5) {
  28.       super(var4 + (var5 ? (var1 == null ? "" : ", SystemID='" + var1 + "'") + (var2 == -1 ? "" : ", Line=" + var2) + (var3 == null ? "" : ", Exception: " + var3) : ""));
  29.       this.systemID = var1;
  30.       this.lineNr = var2;
  31.       this.encapsulatedException = var3;
  32.    }
  33.  
  34.    protected void finalize() throws Throwable {
  35.       this.systemID = null;
  36.       this.encapsulatedException = null;
  37.       super.finalize();
  38.    }
  39.  
  40.    public String getSystemID() {
  41.       return this.systemID;
  42.    }
  43.  
  44.    public int getLineNr() {
  45.       return this.lineNr;
  46.    }
  47.  
  48.    public Exception getException() {
  49.       return this.encapsulatedException;
  50.    }
  51.  
  52.    public void printStackTrace(PrintWriter var1) {
  53.       if (this.encapsulatedException != null) {
  54.          this.encapsulatedException.printStackTrace(var1);
  55.       }
  56.  
  57.       super.printStackTrace(var1);
  58.    }
  59.  
  60.    public void printStackTrace(PrintStream var1) {
  61.       if (this.encapsulatedException != null) {
  62.          this.encapsulatedException.printStackTrace(var1);
  63.       }
  64.  
  65.       super.printStackTrace(var1);
  66.    }
  67.  
  68.    public void printStackTrace() {
  69.       if (this.encapsulatedException != null) {
  70.          this.encapsulatedException.printStackTrace();
  71.       }
  72.  
  73.       super.printStackTrace();
  74.    }
  75. }
  76.