KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > innig > macker > event > ListenerException


1 package net.innig.macker.event;
2
3 import org.apache.commons.lang.exception.NestableException;
4
5 public class ListenerException
6     extends NestableException
7     {
8     public ListenerException(MackerEventListener listener, String JavaDoc message)
9         {
10         super(createMessage(listener, message));
11         this.listener = listener;
12         }
13     
14     public ListenerException(MackerEventListener listener, String JavaDoc message, Throwable JavaDoc cause)
15         {
16         super(createMessage(listener, message), cause);
17         this.listener = listener;
18         }
19     
20     public MackerEventListener getListener()
21         { return listener; }
22     
23     private static String JavaDoc createMessage(MackerEventListener listener, String JavaDoc message)
24         { return "Aborted by " + listener + ": " + message; }
25     
26     private final MackerEventListener listener;
27     }
28
Popular Tags