private void OverrideActivate(Module module) { try { if (module.IsActivated) { return; } module.Activate(true); // If this is a profile module, activate the last active profile after module activation if (module is ProfileModule profileModule) { _profileService.ActivateLastProfile(profileModule); } } catch (Exception e) { _logger.Error(new ArtemisPluginException(module.PluginInfo, "Failed to activate module and last profile.", e), "Failed to activate module and last profile"); throw; } }