summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/dbexception.cxx18
-rw-r--r--connectivity/source/commontools/dbtools.cxx4
-rw-r--r--connectivity/source/commontools/predicateinput.cxx14
-rw-r--r--connectivity/source/commontools/sqlerror.cxx12
4 files changed, 19 insertions, 29 deletions
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index 911c212d9f47..04a71ee4f9e0 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -185,11 +185,11 @@ SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const
}
-void SQLExceptionInfo::prepend( const OUString& _rErrorMessage, const OUString& _rSQLState, const sal_Int32 _nErrorCode )
+void SQLExceptionInfo::prepend( const OUString& _rErrorMessage, const OUString& _rSQLState )
{
SQLException aException;
aException.Message = _rErrorMessage;
- aException.ErrorCode = _nErrorCode;
+ aException.ErrorCode = 0;
aException.SQLState = !_rSQLState.isEmpty() ? _rSQLState : "S1000";
aException.NextException = m_aContent;
m_aContent <<= aException;
@@ -369,8 +369,7 @@ void throwInvalidIndexException(const ::com::sun::star::uno::Reference< ::com::s
}
void throwFunctionNotSupportedSQLException(const OUString& _rFunctionName,
- const css::uno::Reference<css::uno::XInterface>& _rxContext,
- const css::uno::Any& _rNextException) throw (css::sdbc::SQLException)
+ const css::uno::Reference<css::uno::XInterface>& _rxContext) throw (css::sdbc::SQLException)
{
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceStringWithSubstitution(
@@ -382,7 +381,7 @@ void throwFunctionNotSupportedSQLException(const OUString& _rFunctionName,
_rxContext,
getStandardSQLState( StandardSQLState::FUNCTION_NOT_SUPPORTED ),
0,
- _rNextException
+ css::uno::Any()
);
}
@@ -413,7 +412,7 @@ void throwGenericSQLException(const OUString& _rMsg, const Reference< XInterface
throw SQLException( _rMsg, _rxSource, getStandardSQLState( StandardSQLState::GENERAL_ERROR ), 0, _rNextException);
}
-void throwFeatureNotImplementedSQLException( const OUString& _rFeatureName, const Reference< XInterface >& _rxContext, const Any* _pNextException )
+void throwFeatureNotImplementedSQLException( const OUString& _rFeatureName, const Reference< XInterface >& _rxContext )
throw (SQLException)
{
::connectivity::SharedResources aResources;
@@ -427,7 +426,7 @@ void throwFeatureNotImplementedSQLException( const OUString& _rFeatureName, cons
_rxContext,
getStandardSQLState( StandardSQLState::FEATURE_NOT_IMPLEMENTED ),
0,
- _pNextException ? *_pNextException : Any()
+ Any()
);
}
@@ -467,10 +466,9 @@ void throwSQLException( const OUString& _rMessage, const OUString& _rSQLState,
void throwSQLException( const OUString& _rMessage, StandardSQLState _eSQLState,
- const Reference< XInterface >& _rxContext, const sal_Int32 _nErrorCode,
- const Any* _pNextException ) throw (SQLException)
+ const Reference< XInterface >& _rxContext, const sal_Int32 _nErrorCode ) throw (SQLException)
{
- throwSQLException( _rMessage, getStandardSQLState( _eSQLState ), _rxContext, _nErrorCode, _pNextException );
+ throwSQLException( _rMessage, getStandardSQLState( _eSQLState ), _rxContext, _nErrorCode );
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 3baab99890d7..639df3b06d2d 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -734,11 +734,11 @@ Sequence< OUString > getFieldNamesByCommandDescriptor( const Reference< XConnect
}
SQLException prependErrorInfo( const SQLException& _rChainedException, const Reference< XInterface >& _rxContext,
- const OUString& _rAdditionalError, const StandardSQLState _eSQLState, const sal_Int32 _nErrorCode )
+ const OUString& _rAdditionalError, const StandardSQLState _eSQLState )
{
return SQLException( _rAdditionalError, _rxContext,
_eSQLState == StandardSQLState::ERROR_UNSPECIFIED ? OUString() : getStandardSQLState( _eSQLState ),
- _nErrorCode, makeAny( _rChainedException ) );
+ 0, makeAny( _rChainedException ) );
}
namespace
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 63446ed0b859..fe1614b953d0 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -276,8 +276,7 @@ namespace dbtools
OUString OPredicateInputController::getPredicateValueStr(
- const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField,
- OUString* _pErrorMessage ) const
+ const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField ) const
{
OSL_ENSURE( _rxField.is(), "OPredicateInputController::getPredicateValue: invalid params!" );
OUString sReturn;
@@ -290,8 +289,6 @@ namespace dbtools
OUString sError;
OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField );
- if ( _pErrorMessage )
- *_pErrorMessage = sError;
implParseNode(pParseNode, true) >>= sReturn;
}
@@ -300,7 +297,7 @@ namespace dbtools
}
OUString OPredicateInputController::getPredicateValueStr(
- const OUString& _sField, const OUString& _rPredicateValue, OUString* _pErrorMessage ) const
+ const OUString& _sField, const OUString& _rPredicateValue ) const
{
OUString sReturn = _rPredicateValue;
OUString sError;
@@ -345,8 +342,6 @@ namespace dbtools
pColumn->setRealName(sField);
OSQLParseNode* pParseNode = implPredicateTree( sError, _rPredicateValue, xColumn );
- if ( _pErrorMessage )
- *_pErrorMessage = sError;
if(pParseNode)
{
implParseNode(pParseNode, true) >>= sReturn;
@@ -355,8 +350,7 @@ namespace dbtools
}
Any OPredicateInputController::getPredicateValue(
- const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField,
- OUString* _pErrorMessage ) const
+ const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField ) const
{
OSL_ENSURE( _rxField.is(), "OPredicateInputController::getPredicateValue: invalid params!" );
@@ -369,8 +363,6 @@ namespace dbtools
OUString sError;
OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField );
- if ( _pErrorMessage )
- *_pErrorMessage = sError;
return implParseNode(pParseNode, false);
}
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 3b5eda4372e3..8054c59d194b 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -293,9 +293,9 @@ namespace connectivity
}
- OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const
+ OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2 ) const
{
- return m_pImpl->getErrorMessage( _eCondition, _rParamValue1, _rParamValue2, _rParamValue3 );
+ return m_pImpl->getErrorMessage( _eCondition, _rParamValue1, _rParamValue2, ParamValue() );
}
@@ -311,16 +311,16 @@ namespace connectivity
}
- void SQLError::raiseException( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const
+ void SQLError::raiseException( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2 ) const
{
- m_pImpl->raiseException( _eCondition, _rParamValue1, _rParamValue2, _rParamValue3 );
+ m_pImpl->raiseException( _eCondition, _rParamValue1, _rParamValue2, ParamValue() );
}
void SQLError::raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext,
- const Type& _rExceptionType, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const
+ const Type& _rExceptionType, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2 ) const
{
- m_pImpl->raiseTypedException( _eCondition, _rxContext, _rExceptionType, _rParamValue1, _rParamValue2, _rParamValue3 );
+ m_pImpl->raiseTypedException( _eCondition, _rxContext, _rExceptionType, _rParamValue1, _rParamValue2, ParamValue() );
}