KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > rmi > interceptor > InvalidInterceptorException


1 package org.sapia.ubik.rmi.interceptor;
2
3
4 /**
5  * Signals that an interceptor could not be registered for a given
6  * event.
7  *
8  * @author Yanick Duchesne
9  * <dl>
10  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
11  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
12  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
13  * </dl>
14  */

15 public class InvalidInterceptorException extends RuntimeException JavaDoc {
16   private Throwable JavaDoc _err;
17
18   public InvalidInterceptorException(String JavaDoc msg) {
19     super(msg);
20   }
21
22   public InvalidInterceptorException(Throwable JavaDoc err) {
23     _err = err;
24   }
25
26   public InvalidInterceptorException(String JavaDoc msg, Throwable JavaDoc err) {
27     super(msg);
28     _err = err;
29   }
30
31   public void printStackTrace() {
32     super.printStackTrace();
33
34     if (_err != null) {
35       System.err.println("NESTED EXCEPTION:");
36       _err.printStackTrace();
37     }
38   }
39
40   public void printStrackTrace(java.io.PrintStream JavaDoc ps) {
41     super.printStackTrace(ps);
42
43     if (_err != null) {
44       ps.println("NESTED EXCEPTION:");
45       _err.printStackTrace(ps);
46     }
47   }
48
49   public void printStrackTrace(java.io.PrintWriter JavaDoc pw) {
50     super.printStackTrace(pw);
51
52     if (_err != null) {
53       pw.println("NESTED EXCEPTION:");
54       _err.printStackTrace(pw);
55     }
56   }
57
58   public Throwable JavaDoc getNestedError() {
59     return _err;
60   }
61 }
62
Popular Tags