Statistics
| Revision:

root / branches / Mobile_Compatible_Hito_1 / libFMap / src-data / org / gvsig / data / exception / UnsupportedTypeException.java @ 21606

History | View | Annotate | Download (1.06 KB)

1
package org.gvsig.data.exception;
2

    
3
import java.util.Map;
4

    
5
public class UnsupportedTypeException extends WriteException {
6
        private String fieldType="";
7
        private String fieldName="";
8

    
9

    
10
        public UnsupportedTypeException(String sourceName,Throwable exception) {
11
                super("Unsuported type",sourceName,exception);
12
                init();
13
        }
14

    
15
        public UnsupportedTypeException(String fieldType,String sourceName,Throwable exception) {
16
                super("Unsuported type '"+fieldType+"'",sourceName,exception);
17
                this.fieldType = fieldType;
18
                init();
19
        }
20

    
21
        public UnsupportedTypeException(String sourceName,String fieldType,String fieldName) {
22
                super("Unsuported type '"+fieldType+"' for "+fieldName+"'",sourceName);
23
                this.fieldType = fieldType;
24
                this.fieldName = fieldName;
25
                init();
26
        }
27
        /**
28
         *
29
         */
30
        protected void init() {
31
                super.init();
32
                messageKey = "error_unsuported_type";
33
                formatString = "Unsuported type for %(name): %(description) ";
34
        }
35

    
36
        protected Map values() {
37
                Map params = super.values();
38
                params.put("fieldType",this.fieldType);
39
                params.put("fieldName",this.fieldName);
40
                return params;
41
        }
42

    
43

    
44
}