diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-03 14:55:30 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-03 17:22:17 +0100 |
commit | 050c0422b9c8a859d886748ae70e99274d1d9afa (patch) | |
tree | d3e48ee225e48a396178ea88fff1e9ba7ccd4d6b | |
parent | fa73b3fba95d0939cefe7e8987fbcd438a3b725f (diff) |
sfx2: improve reported error message in SfxBaseModel::impl_store()
Old: com.sun.star.io.IOException: SfxBaseModel::impl_store <file:///c:/lo/bugs/saved.xhtml> failed: 0x507
New: com.sun.star.io.IOException: SfxBaseModel::impl_store <file:///c:/lo/bugs/saved.xhtml> 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 <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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)); } } |