summaryrefslogtreecommitdiffstats
path: root/connectivity/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 08:48:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-17 08:25:06 +0200
commit16690220ed6e68f2e9674a09b5008f38c5e6ed8d (patch)
tree2f830b7ac23f136585e7dc4adf5d456f4995cc99 /connectivity/source
parentUse curl while getting the actual persona (diff)
downloadcore-16690220ed6e68f2e9674a09b5008f38c5e6ed8d.tar.gz
core-16690220ed6e68f2e9674a09b5008f38c5e6ed8d.zip
loplugin:singlevalfields
tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx10
-rw-r--r--connectivity/source/drivers/mork/MErrorResource.hxx6
2 files changed, 1 insertions, 15 deletions
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 03ff6372ed9c..0ca4b1712ea9 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -359,20 +359,10 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
{
if (_rError.getResId() != nullptr)
{
- OSL_ENSURE( ( _rError.getErrorCondition() == 0 ),
- "OConnection::throwSQLException: unsupported error code combination!" );
-
throwGenericSQLException( _rError.getResId(), _rxContext );
OSL_FAIL( "OConnection::throwSQLException: unreachable (2)!" );
}
- if ( _rError.getErrorCondition() != 0 )
- {
- SQLError aErrorHelper;
- aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext);
- OSL_FAIL( "OConnection::throwSQLException: unreachable (3)!" );
- }
-
throwGenericSQLException( STR_UNSPECIFIED_ERROR, _rxContext );
}
diff --git a/connectivity/source/drivers/mork/MErrorResource.hxx b/connectivity/source/drivers/mork/MErrorResource.hxx
index f8ab0a7ef983..0691b18134f4 100644
--- a/connectivity/source/drivers/mork/MErrorResource.hxx
+++ b/connectivity/source/drivers/mork/MErrorResource.hxx
@@ -28,12 +28,10 @@ namespace connectivity
{
private:
const char* m_pErrorResourceId;
- sal_Int32 m_nErrorCondition;
public:
ErrorDescriptor()
:m_pErrorResourceId(nullptr)
- ,m_nErrorCondition(0)
{
}
@@ -44,13 +42,11 @@ namespace connectivity
void reset()
{
m_pErrorResourceId = nullptr;
- m_nErrorCondition = 0;
}
const char* getResId() const { return m_pErrorResourceId; }
- sal_Int32 getErrorCondition() const { return m_nErrorCondition; }
- bool is() const { return ( m_pErrorResourceId != nullptr ) || ( m_nErrorCondition != 0 ); }
+ bool is() const { return m_pErrorResourceId != nullptr; }
};
}
}