Revision 23772 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/exceptions/DataException.java
DataException.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.exceptions; |
2 | 2 |
|
3 |
import java.util.Hashtable;
|
|
3 |
import java.util.HashMap;
|
|
4 | 4 |
import java.util.Map; |
5 | 5 |
|
6 | 6 |
import org.gvsig.tools.exception.BaseException; |
7 | 7 |
|
8 |
public class DataException extends BaseException { |
|
8 |
public abstract class DataException extends BaseException {
|
|
9 | 9 |
|
10 |
private String description=""; |
|
10 |
/** |
|
11 |
* |
|
12 |
*/ |
|
13 |
private static final long serialVersionUID = -1951723534438433226L; |
|
11 | 14 |
|
12 |
public DataException(String description){ |
|
13 |
this.description = description; |
|
14 |
this.init(); |
|
15 |
protected Map values = new HashMap(); |
|
15 | 16 |
|
17 |
public DataException(String messageFormat, Throwable cause, |
|
18 |
String messageKey, long code) { |
|
19 |
super(messageFormat, cause, messageKey, code); |
|
16 | 20 |
} |
17 | 21 |
|
18 |
public DataException(String description,Throwable cause){ |
|
19 |
this.description = description; |
|
20 |
this.init(); |
|
21 |
this.initCause(cause); |
|
22 |
public DataException(String messageFormat, String messageKey, long code) { |
|
23 |
super(messageFormat, messageKey, code); |
|
22 | 24 |
} |
23 | 25 |
|
24 |
protected void init() { |
|
25 |
messageKey = "libData_exception"; |
|
26 |
formatString = "%(description)"; |
|
26 |
protected void setValue(String name, String value) { |
|
27 |
this.values.put(name, value); |
|
27 | 28 |
} |
28 | 29 |
|
29 | 30 |
protected Map values() { |
30 |
Hashtable params = new Hashtable(); |
|
31 |
params.put("description",this.description); |
|
32 |
return params; |
|
31 |
return this.values; |
|
33 | 32 |
} |
34 | 33 |
} |
Also available in: Unified diff