From 050c0422b9c8a859d886748ae70e99274d1d9afa Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 3 Jan 2018 14:55:30 +0100 Subject: sfx2: improve reported error message in SfxBaseModel::impl_store() Old: com.sun.star.io.IOException: SfxBaseModel::impl_store failed: 0x507 New: com.sun.star.io.IOException: SfxBaseModel::impl_store failed: 0x507(Error Area:Io Class:Access Code:1287) It's much easier to find the relevant define in include/vcl/errcode.hxx based on the new output. Change-Id: I7d98dcf1ead10264672b45de570e51a153090499 Reviewed-on: https://gerrit.libreoffice.org/47319 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- sfx2/source/doc/sfxbasemodel.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 2b25ad1f993c..779296f35e7c 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3013,8 +3013,10 @@ void SfxBaseModel::impl_store( const OUString& sURL SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SfxEventHintId::SaveToDocFailed : SfxEventHintId::SaveAsDocFailed, GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOCFAILED : GlobalEventId::SAVEASDOCFAILED), m_pData->m_pObjectShell.get() ) ); + std::stringstream aErrCode; + aErrCode << nErrCode; throw task::ErrorCodeIOException( - "SfxBaseModel::impl_store <" + sURL + "> failed: " + nErrCode.toHexString(), + "SfxBaseModel::impl_store <" + sURL + "> failed: " + OUString::fromUtf8(aErrCode.str().c_str()), Reference< XInterface >(), sal_uInt32(nErrCode)); } } -- cgit