Skip to content

Commit

Permalink
Improve error reporting for core mods.
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Apr 5, 2024
1 parent 1c25d99 commit dfe2dd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ private List<ITransformer<?>> loadCoreModScripts() {
try {
return CoreModScriptLoader.loadCoreModScripts(filesWithCoreModScripts);
} catch (NoClassDefFoundError e) {
// Fail for all mods that require a coremod scripting engine to be present
throw new IllegalStateException("Could not find the coremod script-engine, but the following mods require it: " + filesWithCoreModScripts, e);
var message = "Could not find the coremod script-engine, but the following mods require it: " + filesWithCoreModScripts;
ImmediateWindowHandler.crash(message);
throw new IllegalStateException(message, e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,9 @@ public String versionString() {
public List<String> usesServices() {
return usesServices;
}

@Override
public String toString() {
return modFile.toString();
}
}

0 comments on commit dfe2dd0

Please sign in to comment.