jl154 #i113463# some comments and rollback even when runtime exception is thrown
This commit is contained in:
@@ -1136,6 +1136,14 @@ sal_Bool ExtensionManager::synchronize(
|
||||
bModified |= m_bundledRepository->synchronize(xAbortChannel, xCmdEnv);
|
||||
progressBundled.update(OUSTR("\n\n"));
|
||||
|
||||
//Always determine the active extension. This is necessary for the
|
||||
//first-start optimization. The setup creates the registration data for the
|
||||
//bundled extensions (brand_layer/share/prereg/bundled), which is copied to the user
|
||||
//installation (user_installation/extension/bundled) when a user starts OOo
|
||||
//for the first time after running setup. All bundled extensions are registered
|
||||
//at that moment. However, extensions with the same identifier can be in the
|
||||
//shared or user repository, in which case the respective bundled extensions must
|
||||
//be revoked.
|
||||
try
|
||||
{
|
||||
const uno::Sequence<uno::Sequence<Reference<deploy::XPackage> > >
|
||||
|
@@ -866,14 +866,10 @@ void BackendImpl::PackageImpl::processPackage_(
|
||||
try {
|
||||
xPackage->registerPackage( startup, xSubAbortChannel, xCmdEnv );
|
||||
}
|
||||
catch (RuntimeException &) {
|
||||
throw;
|
||||
}
|
||||
catch (ucb::CommandAbortedException &) {
|
||||
throw;
|
||||
}
|
||||
catch (Exception &) {
|
||||
// CommandFailedException, DeploymentException:
|
||||
catch (Exception &)
|
||||
{
|
||||
//We even try a rollback if the user cancelled the action (CommandAbortedException)
|
||||
//in order to prevent invalid database entries.
|
||||
Any exc( ::cppu::getCaughtException() );
|
||||
// try to handle exception, notify:
|
||||
bool approve = false, abort = false;
|
||||
@@ -904,14 +900,8 @@ void BackendImpl::PackageImpl::processPackage_(
|
||||
bundle[ pos ]->revokePackage(
|
||||
xSubAbortChannel, xCmdEnv );
|
||||
}
|
||||
catch (RuntimeException &) {
|
||||
throw;
|
||||
}
|
||||
catch (ucb::CommandAbortedException &) {
|
||||
throw;
|
||||
}
|
||||
catch (Exception &) {
|
||||
// bundle rollback error:
|
||||
catch (Exception &)
|
||||
{
|
||||
OSL_ENSURE( 0, ::rtl::OUStringToOString(
|
||||
::comphelper::anyToString(
|
||||
::cppu::getCaughtException() ),
|
||||
|
Reference in New Issue
Block a user