| 504 | } |
| 505 | |
| 506 | void |
| 507 | BundleRegistry::Load() |
| 508 | { |
| 509 | auto l = this->Lock(); |
| 510 | US_UNUSED(l); |
| 511 | auto bas = coreCtx->storage->GetAllBundleArchives(); |
| 512 | for (auto const& ba : bas) |
| 513 | { |
| 514 | try |
| 515 | { |
| 516 | auto impl = std::make_shared<BundlePrivate>(coreCtx, ba); |
| 517 | bundles.v.insert(std::make_pair(impl->location, impl)); |
| 518 | } |
| 519 | catch (...) |
| 520 | { |
| 521 | ba->SetAutostartSetting(-1); // Do not start on launch |
| 522 | std::cerr << "Failed to load bundle " << util::ToString(ba->GetBundleId()) |
| 523 | << " (" + ba->GetBundleLocation() + ") uninstalled it!" |
| 524 | << " (exception: " << util::GetExceptionStr(std::current_exception()) << ")" << std::endl; |
| 525 | } |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | void |
| 530 | BundleRegistry::CheckIllegalState() const |
no test coverage detected