root / branches / Mobile_Compatible_Hito_1 / libFMap / src-data / org / gvsig / data / exception / ReadException.java @ 21606
History | View | Annotate | Download (794 Bytes)
1 |
package org.gvsig.data.exception; |
---|---|
2 |
|
3 |
import java.util.Map; |
4 |
|
5 |
public class ReadException extends DataException { |
6 |
|
7 |
|
8 |
private String name = null; |
9 |
|
10 |
public ReadException(String description, String name) { |
11 |
super(description);
|
12 |
this.name = name;
|
13 |
init(); |
14 |
} |
15 |
|
16 |
public ReadException(String description, String name,Throwable exception) { |
17 |
super(description);
|
18 |
this.name = name;
|
19 |
init(); |
20 |
initCause(exception); |
21 |
} |
22 |
|
23 |
public ReadException(String name,Throwable exception) { |
24 |
super("Error reading"); |
25 |
this.name = name;
|
26 |
init(); |
27 |
initCause(exception); |
28 |
} |
29 |
|
30 |
protected void init() { |
31 |
super.init();
|
32 |
messageKey = "error_read";
|
33 |
formatString = "Can?t read %(name): %(description) ";
|
34 |
} |
35 |
|
36 |
protected Map values() { |
37 |
Map params = super.values(); |
38 |
params.put("name",this.name); |
39 |
return params;
|
40 |
} |
41 |
|
42 |
} |