Statistics
| Branch: | Tag: | Revision:

root / src / gr / ebs / gss / client / exceptions / ObjectNotFoundException.java @ 86c951b2

History | View | Annotate | Download (1.9 kB)

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
 * An exception thrown when a requested object was not found.
25
 *
26
 * @author past
27
 */
28
public class ObjectNotFoundException extends Exception implements Serializable {
29

    
30
        /**
31
         * The serial version UID.
32
         */
33
        private static final long serialVersionUID = 1L;
34

    
35
        /**
36
         * The stored message that provides details about the problem.
37
         */
38
        private String message;
39

    
40
        /**
41
         * Default constructor
42
         */
43
        public ObjectNotFoundException() {
44
                super();
45
        }
46

    
47
        /**
48
         * Constructor from error message.
49
         *
50
         * @param newMessage The error message
51
         */
52
        public ObjectNotFoundException(final String newMessage) {
53
                super(newMessage);
54
                message = newMessage;
55
        }
56

    
57
        /**
58
         * Constructor from Throwable.
59
         *
60
         * @param cause The throwable that caused the exception
61
         */
62
        public ObjectNotFoundException(final Throwable cause) {
63
                super(cause);
64
        }
65

    
66
        /**
67
         * Constructor from error message and Throwable.
68
         *
69
         * @param newMessage The error message
70
         * @param cause The throwable that caused the exception
71
         */
72
        public ObjectNotFoundException(final String newMessage, final Throwable cause) {
73
                super(newMessage, cause);
74
                message = newMessage;
75
        }
76

    
77
        @Override
78
        public String getMessage() {
79
                return message;
80
        }
81

    
82
}