diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-10-12 22:02:15 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-10-14 15:37:17 +0200 |
commit | 176e8cf09a527438ec9b2b20ba2df23fa45226bc (patch) | |
tree | 76897d74143771a9ee9249c49bbe91da9ffa0433 /ucbhelper | |
parent | 328d6aae9e2b7a73f6672800629230f5b46d15b1 (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 'ucbhelper')
-rw-r--r-- | ucbhelper/source/provider/cancelcommandexecution.cxx | 8 | ||||
-rw-r--r-- | ucbhelper/source/provider/simpleioerrorrequest.cxx | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx b/ucbhelper/source/provider/cancelcommandexecution.cxx index 42850c5ee306..57166e49b065 100644 --- a/ucbhelper/source/provider/cancelcommandexecution.cxx +++ b/ucbhelper/source/provider/cancelcommandexecution.cxx @@ -80,12 +80,8 @@ void cancelCommandExecution( const ucb::IOErrorCode eError, { // Fast path - ucb::InteractiveAugmentedIOException aRequest; - aRequest.Message = rMessage; - aRequest.Context = xContext; - aRequest.Classification = task::InteractionClassification_ERROR; - aRequest.Code = eError; - aRequest.Arguments = rArgs; + ucb::InteractiveAugmentedIOException aRequest( + rMessage, xContext, task::InteractionClassification_ERROR, eError, rArgs); cppu::throwException( uno::Any( aRequest ) ); } else diff --git a/ucbhelper/source/provider/simpleioerrorrequest.cxx b/ucbhelper/source/provider/simpleioerrorrequest.cxx index df28f63525bc..0c0857f915c1 100644 --- a/ucbhelper/source/provider/simpleioerrorrequest.cxx +++ b/ucbhelper/source/provider/simpleioerrorrequest.cxx @@ -32,12 +32,8 @@ SimpleIOErrorRequest::SimpleIOErrorRequest( const uno::Reference< ucb::XCommandProcessor > & xContext ) { // Fill request... - ucb::InteractiveAugmentedIOException aRequest; - aRequest.Message = rMessage; - aRequest.Context = xContext; - aRequest.Classification = task::InteractionClassification_ERROR; - aRequest.Code = eError; - aRequest.Arguments = rArgs; + ucb::InteractiveAugmentedIOException aRequest( + rMessage, xContext, task::InteractionClassification_ERROR, eError, rArgs); setRequest( uno::Any( aRequest ) ); |