Improved rounding for human-readable percentOfFreeSpace().
[pithos] / src / gr / ebs / gss / client / exceptions / DuplicateNameException.java
1 /*
2  * Copyright 2007, 2008, 2009 Electronic Business Systems Ltd.
3  *
4  * This file is part of GSS.
5  *
6  * GSS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * GSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 package gr.ebs.gss.client.exceptions;
20
21 import java.io.Serializable;
22
23 /**
24  * @author chstath
25  */
26 public class DuplicateNameException extends Exception implements Serializable {
27
28         /**
29          * The serial version UID.
30          */
31         private static final long serialVersionUID = 1L;
32
33         /**
34          * The stored message that provides details about the problem.
35          */
36         private String message;
37
38         /**
39          *
40          */
41         public DuplicateNameException() {
42         }
43
44         /**
45          * @param newMessage
46          */
47         public DuplicateNameException(final String newMessage) {
48                 super(newMessage);
49                 message = newMessage;
50         }
51
52         /**
53          * @param cause
54          */
55         public DuplicateNameException(final Throwable cause) {
56                 super(cause);
57         }
58
59         /**
60          * @param newMessage
61          * @param cause
62          */
63         public DuplicateNameException(final String newMessage, final Throwable cause) {
64                 super(newMessage, cause);
65                 message = newMessage;
66         }
67
68         /*
69          * (non-Javadoc)
70          *
71          * @see java.lang.Throwable#getMessage()
72          */
73         public String getMessage() {
74                 return message;
75         }
76 }