Skip to content

Commit

Permalink
UnresolvedDependencyException is in package excpeptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
soloturn committed May 5, 2024
1 parent a83ab2d commit f72b3c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import org.terasology.engine.world.sun.CelestialSystem;
import org.terasology.engine.world.sun.DefaultCelestialSystem;
import org.terasology.gestalt.module.ModuleEnvironment;
import org.terasology.gestalt.module.exceptions.UnresolvedDependencyException;

import java.io.IOException;
import java.nio.file.Path;
Expand Down Expand Up @@ -104,7 +105,7 @@ public boolean step() {
// setting the world seed will create the world builder
worldGenerator.setWorldSeed(worldInfo.getSeed());
context.put(WorldGenerator.class, worldGenerator);
} catch (UnresolvedWorldGeneratorException e) {
} catch (UnresolvedWorldGeneratorException | UnresolvedDependencyException e) {
logger.error("Unable to load world generator {}. Available world generators: {}",
worldInfo.getWorldGenerator(), worldGeneratorManager.getWorldGenerators());
context.get(GameEngine.class).changeState(new StateMainMenu("Failed to resolve world generator."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import org.terasology.gestalt.entitysystem.component.Component;
import org.terasology.gestalt.module.Module;
import org.terasology.gestalt.module.ModuleEnvironment;
import org.terasology.gestalt.module.UnresolvedDependencyException;
import org.terasology.gestalt.module.exceptions.UnresolvedDependencyException;
import org.terasology.gestalt.module.dependencyresolution.DependencyInfo;
import org.terasology.gestalt.module.dependencyresolution.DependencyResolver;
import org.terasology.gestalt.module.dependencyresolution.ResolutionResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.terasology.engine.world.generator.WorldGenerator;
import org.terasology.gestalt.module.Module;
import org.terasology.gestalt.module.ModuleEnvironment;
import org.terasology.gestalt.module.UnresolvedDependencyException;
import org.terasology.gestalt.module.exceptions.UnresolvedDependencyException;
import org.terasology.gestalt.module.dependencyresolution.DependencyResolver;
import org.terasology.gestalt.module.dependencyresolution.ResolutionResult;
import org.terasology.gestalt.naming.Name;
Expand Down Expand Up @@ -99,7 +99,8 @@ public WorldGeneratorInfo getWorldGeneratorInfo(SimpleUri uri) {
* @param context objects from this context will be injected into the
* @return The instantiated world generator.
*/
public static WorldGenerator createGenerator(SimpleUri uri, Context context) throws UnresolvedWorldGeneratorException {
public static WorldGenerator createGenerator(SimpleUri uri, Context context)
throws UnresolvedWorldGeneratorException, UnresolvedDependencyException {
ModuleManager moduleManager = context.get(ModuleManager.class);
Module module = moduleManager.getEnvironment().get(uri.getModuleName());
if (module == null) {
Expand Down

0 comments on commit f72b3c6

Please sign in to comment.