Kaydet (Commit) c856ab73 authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

Cleanup ResultSet exceptions.

Change-Id: I77e4fd5fffe45446050f8a1dfbcc8cc27290c786
üst 65719df3
...@@ -278,15 +278,18 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) throw(SQLException, Runtim ...@@ -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) throw (SQLException, RuntimeException)
{ {
MutexGuard aGuard(m_rMutex); MutexGuard aGuard(m_rMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 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() ...@@ -298,7 +301,10 @@ void SAL_CALL OResultSet::checkRowIndex()
if((m_currentRow < 1) || m_bIsAfterLastRow) 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);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment