summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index b58d8460ebd1..ea038791781a 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -488,18 +488,14 @@ mkException( OUString const & i_rMessage,
ucb::IOErrorCode const i_ErrorCode,
OUString const & i_rUri, OUString const & i_rResource)
{
- ucb::InteractiveAugmentedIOException iaioe;
- iaioe.Message = i_rMessage;
- iaioe.Classification = task::InteractionClassification_ERROR;
- iaioe.Code = i_ErrorCode;
-
const beans::PropertyValue uriProp("Uri",
-1, uno::Any(i_rUri), static_cast<beans::PropertyState>(0));
const beans::PropertyValue rnProp(
"ResourceName",
-1, uno::Any(i_rResource), static_cast<beans::PropertyState>(0));
- iaioe.Arguments = { uno::Any(uriProp), uno::Any(rnProp) };
- return iaioe;
+ return ucb::InteractiveAugmentedIOException(i_rMessage, {},
+ task::InteractionClassification_ERROR, i_ErrorCode,
+ { uno::Any(uriProp), uno::Any(rnProp) });
}
/** error handling policy.