Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.mapcontext / org.gvsig.fmap.mapcontext.api / src / main / java / org / gvsig / fmap / mapcontext / events / ErrorEvent.java @ 40559

History | View | Annotate | Download (2.82 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program 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 this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
/* CVS MESSAGES:
25
 *
26
 * $Id: ErrorEvent.java 20989 2008-05-28 11:05:57Z jmvivo $
27
 * $Log$
28
 * Revision 1.2  2005-12-20 11:23:43  jaume
29
 * Added ErrorEvent to any Fmap, and error handling to FLayers
30
 *
31
 * Revision 1.1  2005/12/20 10:56:34  jaume
32
 * Added an error event to fmap
33
 *
34
 *
35
 */
36
/**
37
 * 
38
 */
39
package org.gvsig.fmap.mapcontext.events;
40

    
41

    
42
/**
43
 * <p><code>ErrorEvent</code> stores all necessary information of an error produced on a layer.</p>
44
 * 
45
 * @see FMapEvent
46
 * 
47
 * 
48
 * @author jaume
49
 */
50
/* 
51
 * jjdc
52
 *  
53
 * FIXME: No esta claro que no se use.
54
 *               Si se deja deprecated habria que documentar por que hay que sustituirla. 
55
 * @deprecated As of release 1.0.2, don't used
56
 */
57
public class ErrorEvent extends FMapEvent {
58
        /**
59
         * <p>Extra information about the error, like which layer was produced.</p>
60
         * 
61
         * @see #getMessage()
62
         */
63
        private String message;
64
    
65
    /**
66
     * <p>Exception associated to the error produced.</p>
67
     * 
68
     * @see #getException()
69
     */
70
        private Exception exception;
71

    
72
    /**
73
     * <p>Constructs an <code>ErrorEvent</code> with the specified, detailed message as extra information, and the exception thrown.</p>
74
     * 
75
     * @param message detailed error information
76
     * @param e the exception thrown when the error was produced
77
     */
78
        public ErrorEvent(String message, Exception e){
79
                this.message = message;
80
                this.exception = e;
81
        }
82

    
83
    /**
84
     * <p>Gets the <code>Exception</code> associated to the error produced.</p>
85
     * 
86
     * @return the exception thrown when the error was produced
87
     */
88
        public Exception getException() {
89
                return exception;
90
        }
91

    
92
    /**
93
     * <p>Gets detailed message with extra information.</p>
94
     * 
95
     * @return the detail message with extra information
96
     */
97
        public String getMessage() {
98
                return message;
99
        }
100

    
101
}