1 16 17 package org.springframework.jdbc; 18 19 import java.sql.SQLException ; 20 21 import org.springframework.dao.InvalidDataAccessResourceUsageException; 22 23 34 public class BadSqlGrammarException extends InvalidDataAccessResourceUsageException { 35 36 private String sql; 37 38 39 45 public BadSqlGrammarException(String task, String sql, SQLException ex) { 46 super(task + "; bad SQL grammar [" + sql + "]", ex); 47 this.sql = sql; 48 } 49 50 51 54 public SQLException getSQLException() { 55 return (SQLException ) getCause(); 56 } 57 58 61 public String getSql() { 62 return sql; 63 } 64 65 } 66 | Popular Tags |