Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dataDB / src / org / gvsig / data / datastores / vectorial / db / jdbc / SQLException.java @ 20973

History | View | Annotate | Download (904 Bytes)

1
package org.gvsig.data.datastores.vectorial.db.jdbc;
2

    
3
import java.util.Hashtable;
4
import java.util.Iterator;
5
import java.util.Map;
6

    
7
import org.gvsig.data.OpenException;
8
import org.gvsig.exceptions.IExceptionTranslator;
9

    
10
public class SQLException extends OpenException {
11
        protected String sql="";
12
        protected String operation="";
13
        public SQLException(String description,String name) {
14
                super(description,name);
15
                init();
16
        }
17

    
18
        public SQLException(String sql, String operation,Throwable exception) {
19
                super("SqlException",exception);
20
                this.sql = sql;
21
                this.operation = operation;
22
                init();
23
        }
24
        /**
25
         *
26
         */
27
        protected void init() {
28
                messageKey = "SQL_exception";
29
                formatString = "Error in %(operation) executing the sql statement: %(sql): %(description) ";
30
        }
31

    
32
        protected Map values() {
33
                Map params = super.values();
34
                params.put("operation",operation);
35
                params.put("sql",sql);
36
                return params;
37
        }
38
}