From c856ab73af3ab108f64e0c9d9857c35a4849f030 Mon Sep 17 00:00:00 2001 From: "Andrzej J.R. Hunt" Date: Thu, 19 Sep 2013 20:35:50 +0100 Subject: Cleanup ResultSet exceptions. Change-Id: I77e4fd5fffe45446050f8a1dfbcc8cc27290c786 --- connectivity/source/drivers/firebird/ResultSet.cxx | 14 ++++++++++---- 1 file 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); } } -- cgit