diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-03 14:55:30 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-20 15:50:29 +0100 |
commit | 22779e8220848a5d52ee313a180535d4f6359ad0 (patch) | |
tree | a5ef57cf4d7526761d5c94fe53a39afda75e2b46 /sfx2 | |
parent | 6f6814b9a354f712a4069932271dc7ba578774fd (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>
(cherry picked from commit 050c0422b9c8a859d886748ae70e99274d1d9afa)
Diffstat (limited to 'sfx2')
-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 7cb1076485a5..577562aa974c 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3019,8 +3019,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)); } } |