1 16 17 package org.springframework.jdbc; 18 19 import java.sql.SQLException ; 20 21 import org.springframework.dao.UncategorizedDataAccessException; 22 23 30 public class UncategorizedSQLException extends UncategorizedDataAccessException { 31 32 33 private final String sql; 34 35 36 42 public UncategorizedSQLException(String task, String sql, SQLException ex) { 43 super(task + "; uncategorized SQLException for SQL [" + sql + "]; SQL state [" + 44 ex.getSQLState() + "]; error code [" + ex.getErrorCode() + "]; " + ex.getMessage(), ex); 45 this.sql = sql; 46 } 47 48 49 52 public SQLException getSQLException() { 53 return (SQLException ) getCause(); 54 } 55 56 59 public String getSql() { 60 return sql; 61 } 62 63 } 64 | Popular Tags |