/[classpath]/classpath/javax/xml/transform/TransformerException.java
ViewVC logotype

Diff of /classpath/javax/xml/transform/TransformerException.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.3 by gnu_andrew, Tue Aug 2 20:12:39 2005 UTC revision 1.1.2.4 by gnu_andrew, Tue Sep 20 18:46:36 2005 UTC
# Line 47  import java.io.PrintWriter; Line 47  import java.io.PrintWriter;
47  public class TransformerException  public class TransformerException
48    extends Exception    extends Exception
49  {  {
50      private static final long serialVersionUID = 975798773772956428L;
51    
52      // Field names fixed by serialization spec.
53    private SourceLocator  locator;    private SourceLocator  locator;
54    private Throwable  cause;    private Throwable  containedException;
55    
56    /**    /**
57     * Constructor with a detail message.     * Constructor with a detail message.
# Line 94  public class TransformerException Line 96  public class TransformerException
96      if (cause != null)      if (cause != null)
97        {        {
98          initCause(cause);          initCause(cause);
99          this.cause = cause;          this.containedException = cause;
100        }        }
101    }    }
102    
# Line 119  public class TransformerException Line 121  public class TransformerException
121     */     */
122    public Throwable getException()    public Throwable getException()
123    {    {
124      return cause;      return containedException;
125    }    }
126    
127    /**    /**
# Line 127  public class TransformerException Line 129  public class TransformerException
129     */     */
130    public Throwable getCause()    public Throwable getCause()
131    {    {
132      return cause;      return containedException;
133    }    }
134    
135    /**    /**
# Line 143  public class TransformerException Line 145  public class TransformerException
145     */     */
146    public Throwable initCause(Throwable cause)    public Throwable initCause(Throwable cause)
147    {    {
148      if (this.cause != null)      if (this.containedException != null)
149        {        {
150          throw new IllegalStateException();          throw new IllegalStateException();
151        }        }
# Line 151  public class TransformerException Line 153  public class TransformerException
153        {        {
154          throw new IllegalArgumentException();          throw new IllegalArgumentException();
155        }        }
156      this.cause = cause;      this.containedException = cause;
157      return this;      return this;
158    }    }
159    
# Line 221  public class TransformerException Line 223  public class TransformerException
223    public void printStackTrace(PrintStream s)    public void printStackTrace(PrintStream s)
224    {    {
225      super.printStackTrace(s);      super.printStackTrace(s);
226      if (cause != null)      if (containedException != null)
227        {        {
228          s.print("caused by ");          s.print("caused by ");
229          cause.printStackTrace(s);          containedException.printStackTrace(s);
230        }        }
231    }    }
232    
233    public void printStackTrace(PrintWriter s)    public void printStackTrace(PrintWriter s)
234    {    {
235      super.printStackTrace(s);      super.printStackTrace(s);
236      if (cause != null)      if (containedException != null)
237        {        {
238          s.print("caused by ");          s.print("caused by ");
239          cause.printStackTrace(s);          containedException.printStackTrace(s);
240        }        }
241    }    }
242    

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26