summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-09-28 15:15:53 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-09-28 16:02:55 +0200
commit11aa86140eaac3d1d67db1f337fc1c76a511778f (patch)
tree7809cae938a1dfb247c112216e2e45fcdbec9da0 /sfx2/source
parent608c35665bee5990bd7e2799854e233d1454b6a4 (diff)
Improve OleRun error reporting
1. Pass its error message up the call stack as the exception's message. 2. In case of REGDB_E_CLASSNOTREG, also obtain the object's class name and append it to the message. 3. Show this information in the message displayed for OLE activation error. This introduces a new SetExtendedMessage method in SfxErrorContext to store extra information for specific errors. Change-Id: Id3863276266d992ae407fbfa5568acf5c57aa96f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/view/ipclient.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 367d3070938b..260bdff77f34 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -970,7 +970,7 @@ ErrCode SfxInPlaceClient::DoVerb(sal_Int32 nVerb)
m_xImp->m_xObject->doVerb( nVerb );
}
- catch ( embed::UnreachableStateException& )
+ catch ( embed::UnreachableStateException& e )
{
if (nVerb == embed::EmbedVerbs::MS_OLEVERB_PRIMARY || nVerb == embed::EmbedVerbs::MS_OLEVERB_OPEN || nVerb == embed::EmbedVerbs::MS_OLEVERB_SHOW)
{
@@ -997,6 +997,7 @@ ErrCode SfxInPlaceClient::DoVerb(sal_Int32 nVerb)
{
TOOLS_WARN_EXCEPTION("embeddedobj", "SfxInPlaceClient::DoVerb: -9 fallback path");
nError = ERRCODE_SO_GENERALERROR;
+ aEc.SetExtendedMessage(ERRCODE_SO_GENERALERROR, e.Message);
}
}
}