summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-10-12 22:02:15 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-10-14 15:37:17 +0200
commit176e8cf09a527438ec9b2b20ba2df23fa45226bc (patch)
tree76897d74143771a9ee9249c49bbe91da9ffa0433 /dbaccess/source/ui/querydesign
parent328d6aae9e2b7a73f6672800629230f5b46d15b1 (diff)
Use exception ctors, instead of setting members later
Avoids overwriting source location in message Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'dbaccess/source/ui/querydesign')
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 38caed31a79f..49f1b4e02be5 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -614,11 +614,9 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
void OQueryController::impl_showAutoSQLViewError( const css::uno::Any& _rErrorDetails )
{
- SQLContext aErrorContext;
- aErrorContext.Message = lcl_getObjectResourceString( STR_ERROR_PARSING_STATEMENT, m_nCommandType );
- aErrorContext.Context = *this;
- aErrorContext.Details = lcl_getObjectResourceString( STR_INFO_OPENING_IN_SQL_VIEW, m_nCommandType );
- aErrorContext.NextException = _rErrorDetails;
+ SQLContext aErrorContext(
+ lcl_getObjectResourceString(STR_ERROR_PARSING_STATEMENT, m_nCommandType), *this, {}, 0,
+ _rErrorDetails, lcl_getObjectResourceString(STR_INFO_OPENING_IN_SQL_VIEW, m_nCommandType));
showError( aErrorContext );
}