From 2d10fa786792a27adb4097abe8c92f36cf47e6ce Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 19 Aug 2022 12:31:36 +0100 Subject: Prevent loading a world with unresolved dependencies (#12542) --- src/server.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 93767da9d..06e7b9d50 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -425,14 +425,10 @@ void Server::init() m_modmgr = std::make_unique(m_path_world); std::vector unsatisfied_mods = m_modmgr->getUnsatisfiedMods(); - // complain about mods with unsatisfied dependencies if (!m_modmgr->isConsistent()) { - m_modmgr->printUnsatisfiedModsError(); - - warningstream - << "You have unsatisfied dependencies, loading your world anyway. " - << "This will become a fatal error in the future." << std::endl; + std::string error = m_modmgr->getUnsatisfiedModsError(); + throw ServerError(error); } //lock environment -- cgit v1.2.3