diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-26 13:33:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-26 13:34:31 +0200 |
commit | 89d2ddacbb29377b97a8479a105f1a27c513cd5a (patch) | |
tree | d35a3c220600b2f5c696384e8933387113ff4780 /tools | |
parent | 3c65f07ede73105cca4b1b9597d6f8b02f226db9 (diff) |
improve the logging of resource loading failures
this message was particularly unreadable in the unit test logs
Change-Id: I5faa5b33ae75488664d498232ec26c66f11361f3
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/rc/resmgr.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 2b46d4b02a50..fb3ed921d168 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -667,30 +667,30 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr, ResMgr* pNewResMgr = new ResMgr( pImp ); - OStringBuffer aStr(OUStringToOString(pResMgr->GetFileName(), + OString aFilename(OUStringToOString(pResMgr->GetFileName(), RTL_TEXTENCODING_UTF8)); + OStringBuffer aStr(pMessage); + aStr.append(aFilename); + aStr.append('\n'); - if (aStr.getLength()) - aStr.append('\n'); - - aStr.append("Class: "); + aStr.append(" Class: "); aStr.append(OUStringToOString(GetTypeRes_Impl(ResId(nRT, *pNewResMgr)), RTL_TEXTENCODING_UTF8)); aStr.append(", Id: "); aStr.append(static_cast<sal_Int32>(nId)); aStr.append(". "); - aStr.append(pMessage); - aStr.append("\nResource Stack\n"); + aStr.append(" Resource Stack:"); while( nDepth > 0 ) { - aStr.append("Class: "); + aStr.append(" [ Class: "); aStr.append(OUStringToOString(GetTypeRes_Impl( ResId(rResStack[nDepth].pResource->GetRT(), *pNewResMgr)), RTL_TEXTENCODING_UTF8)); aStr.append(", Id: "); aStr.append(static_cast<sal_Int32>( rResStack[nDepth].pResource->GetId())); + aStr.append("]"); nDepth--; } |