changed exception class thrown for problems configuring GenericSqlQuery class (SPR-3986)

This commit is contained in:
Thomas Risberg 2009-03-12 21:30:42 +00:00
parent 49549d66ae
commit a3942c5c1b
1 changed files with 3 additions and 5 deletions

View File

@ -16,13 +16,11 @@
package org.springframework.jdbc.object; package org.springframework.jdbc.object;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map; import java.util.Map;
import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.RowMapper;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.dao.InvalidDataAccessResourceUsageException;
public class GenericSqlQuery extends SqlQuery { public class GenericSqlQuery extends SqlQuery {
@ -49,10 +47,10 @@ public class GenericSqlQuery extends SqlQuery {
return (RowMapper) rowMapperClass.newInstance(); return (RowMapper) rowMapperClass.newInstance();
} }
catch (InstantiationException e) { catch (InstantiationException e) {
throw new InvalidDataAccessApiUsageException("Unable to instantiate RowMapper", e); throw new InvalidDataAccessResourceUsageException("Unable to instantiate RowMapper", e);
} }
catch (IllegalAccessException e) { catch (IllegalAccessException e) {
throw new InvalidDataAccessApiUsageException("Unable to instantiate RowMapper", e); throw new InvalidDataAccessResourceUsageException("Unable to instantiate RowMapper", e);
} }
} }
} }