KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > dream > PullException


1 /**
2  * Dream
3  * Copyright (C) 2003-2004 INRIA Rhone-Alpes
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: dream@objectweb.org
20  *
21  * Initial developer(s): Matthieu Leclercq
22  * Contributor(s):
23  */

24
25 package org.objectweb.dream;
26
27 /**
28  * This is a generic exception which a pull method can throw.
29  */

30 public class PullException extends Exception JavaDoc
31 {
32
33   private Throwable JavaDoc cause;
34
35   /**
36    * @see Exception#Exception()
37    */

38   public PullException()
39   {
40     super();
41   }
42
43   /**
44    * @see Exception#Exception(java.lang.String)
45    */

46   public PullException(String JavaDoc message)
47   {
48     super(message);
49   }
50
51   /**
52    * Creates an exception caused by another exception.
53    *
54    * @param message the detail message.
55    * @param cause a throwable that cause this exception.
56    * @see Exception#Exception(java.lang.String)
57    */

58   public PullException(String JavaDoc message, Throwable JavaDoc cause)
59   {
60     super(message);
61     this.cause = cause;
62   }
63
64   /**
65    * Creates an exception caused by another exception.
66    *
67    * @param cause a throwable that cause this exception.
68    * @see Exception#Exception()
69    */

70   public PullException(Throwable JavaDoc cause)
71   {
72     super();
73     this.cause = cause;
74   }
75
76   /**
77    * @return Returns the cause.
78    */

79   public Throwable JavaDoc getCause()
80   {
81     return cause;
82   }
83
84   /**
85    * @param cause The cause to set.
86    */

87   public void setCause(Throwable JavaDoc cause)
88   {
89     this.cause = cause;
90   }
91
92 }
Popular Tags