Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libTools / src-test / org / gvsig / tools / exception / DriverException.java @ 23150

History | View | Annotate | Download (1.04 KB)

1
package org.gvsig.tools.exception;
2

    
3
import java.util.HashMap;
4
import java.util.Map;
5

    
6
public class DriverException extends BaseException {
7
        
8
        private static final long serialVersionUID = -8985920349210629999L;
9
        
10
    private static final String KEY = "Error_in_the_driver_%(driverName)s";
11

    
12
    private static final String MESSAGE = "Error in the driver %(driverName)s";
13
        
14
        private String driverName;
15
        
16
        public DriverException(String driverName) {
17
                super(MESSAGE, KEY, serialVersionUID);
18
                this.driverName = driverName;
19
        }
20
        
21
        public DriverException(String driverName, Throwable cause) {
22
        super(MESSAGE, cause, KEY, serialVersionUID);
23
                this.driverName = driverName;
24
        }
25
    
26
    public DriverException(String driverName, String message, Throwable cause,
27
            String key, long code) {
28
        super(message, cause, key, code);
29
        this.driverName = driverName;
30
    }
31

    
32
        public String getDriverName() {
33
                return driverName;
34
        }
35
        
36
        protected Map values() {
37
                HashMap values = new HashMap();
38
                values.put("driverName",this.driverName);
39
                return values;
40
        }
41
}