summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-09-19 20:35:50 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-09-19 20:37:55 +0100
commitc856ab73af3ab108f64e0c9d9857c35a4849f030 (patch)
tree3a10ac56b0be0368675cfedd1a060d225c2befb2 /connectivity
parent65719df3e38e16feecf025f4773562dfa2011f28 (diff)
Cleanup ResultSet exceptions.
Change-Id: I77e4fd5fffe45446050f8a1dfbcc8cc27290c786
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 087453dfc860..0700e11b782e 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -278,15 +278,18 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) throw(SQLException, Runtim
}
}
-void SAL_CALL OResultSet::checkColumnIndex(sal_Int32 index)
+void SAL_CALL OResultSet::checkColumnIndex(sal_Int32 nIndex)
throw (SQLException, RuntimeException)
{
MutexGuard aGuard(m_rMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- if( index < 1 || index > m_fieldCount )
+ if( nIndex < 1 || nIndex > m_fieldCount )
{
- throw SQLException( "Column Index is outwith valid range", *this, OUString(), 1, Any() );
+ ::dbtools::throwSQLException(
+ "No column " + OUString::number(nIndex),
+ ::dbtools::SQL_COLUMN_NOT_FOUND,
+ *this);
}
}
@@ -298,7 +301,10 @@ void SAL_CALL OResultSet::checkRowIndex()
if((m_currentRow < 1) || m_bIsAfterLastRow)
{
- throw SQLException( "Row index is out of valid range.", *this, OUString(),1, Any() );
+ ::dbtools::throwSQLException(
+ "Invalid Row",
+ ::dbtools::SQL_INVALID_CURSOR_POSITION,
+ *this);
}
}