state *what* was not found when throwing exception

This commit is contained in:
Caolán McNamara 2012-03-08 10:53:31 +00:00
parent 6a7a5740ad
commit e4fe6a9c46

View file

@ -246,7 +246,10 @@ void NameContainer::removeByName( const OUString& aName )
NameContainerNameMap::iterator aIt = mHashMap.find( aName ); NameContainerNameMap::iterator aIt = mHashMap.find( aName );
if( aIt == mHashMap.end() ) if( aIt == mHashMap.end() )
{ {
throw NoSuchElementException(); rtl::OUString sMessage = rtl::OUStringBuffer().append('"')
.append(aName).append("\" not found")
.makeStringAndClear();
throw NoSuchElementException(sMessage, uno::Reference< uno::XInterface >());
} }
sal_Int32 iHashResult = (*aIt).second; sal_Int32 iHashResult = (*aIt).second;
@ -1170,16 +1173,15 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
mxSFI->kill( aPrevFolder ); mxSFI->kill( aPrevFolder );
} }
} }
catch(const Exception& ) catch(const Exception& e)
{ {
bCleanUp = true; bCleanUp = true;
SAL_WARN("basic", "Upgrade of Basic installation failed somehow: " << e.Message);
} }
// #i93163 // #i93163
if( bCleanUp ) if( bCleanUp )
{ {
SAL_WARN("basic", "Upgrade of Basic installation failed somehow");
static const char strErrorSavFolderName[] = "__basic_80_err"; static const char strErrorSavFolderName[] = "__basic_80_err";
INetURLObject aPrevUserBasicInetObj_Err( aUserBasicInetObj ); INetURLObject aPrevUserBasicInetObj_Err( aUserBasicInetObj );
aPrevUserBasicInetObj_Err.removeSegment(); aPrevUserBasicInetObj_Err.removeSegment();