KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > user > UserAlreadyExistsException


1 /**
2  * $RCSfile: UserAlreadyExistsException.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2004/10/25 23:42:00 $
5  *
6  * Copyright (C) 2004 Jive Software. All rights reserved.
7  *
8  * This software is published under the terms of the GNU Public License (GPL),
9  * a copy of which is included in this distribution.
10  */

11
12 package org.jivesoftware.messenger.user;
13
14 import java.io.PrintStream JavaDoc;
15 import java.io.PrintWriter JavaDoc;
16
17 /**
18  * Thrown when attempting to create a user that already exists.
19  *
20  * @author Iain Shigeoka
21  */

22 public class UserAlreadyExistsException extends Exception JavaDoc {
23
24     private Throwable JavaDoc nestedThrowable = null;
25
26     public UserAlreadyExistsException() {
27         super();
28     }
29
30     public UserAlreadyExistsException(String JavaDoc msg) {
31         super(msg);
32     }
33
34     public UserAlreadyExistsException(Throwable JavaDoc nestedThrowable) {
35         this.nestedThrowable = nestedThrowable;
36     }
37
38     public UserAlreadyExistsException(String JavaDoc msg, Throwable JavaDoc nestedThrowable) {
39         super(msg);
40         this.nestedThrowable = nestedThrowable;
41     }
42
43     public void printStackTrace() {
44         super.printStackTrace();
45         if (nestedThrowable != null) {
46             nestedThrowable.printStackTrace();
47         }
48     }
49
50     public void printStackTrace(PrintStream JavaDoc ps) {
51         super.printStackTrace(ps);
52         if (nestedThrowable != null) {
53             nestedThrowable.printStackTrace(ps);
54         }
55     }
56
57     public void printStackTrace(PrintWriter JavaDoc pw) {
58         super.printStackTrace(pw);
59         if (nestedThrowable != null) {
60             nestedThrowable.printStackTrace(pw);
61         }
62     }
63 }
Popular Tags