mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Fix up "errored" mod states so they actually read as errors
This commit is contained in:
1 parent
b8ae8664ac
commit
ad8e9f10c3
2 files changed
+16
-5
No files matched your search
@@ -468,10 +468,20 @@ public class Loader
|
||||
continue;
|
||||
}
|
||||
String clazzName=path+fname.group(2);
|
||||
log.fine(String.format("Found a mod class %s in directory %s, attempting to load it", clazzName, modDir.getName()));
|
||||
loadModClass(modDir, file.getName(), clazzName, sourceType);
|
||||
log.fine(String.format("Successfully loaded mod class %s", file.getName()));
|
||||
foundAModClass = true;
|
||||
try
|
||||
{
|
||||
log.fine(String.format("Found a mod class %s in directory %s, attempting to load it", clazzName, modDir.getName()));
|
||||
loadModClass(modDir, file.getName(), clazzName, sourceType);
|
||||
log.fine(String.format("Successfully loaded mod class %s", file.getName()));
|
||||
foundAModClass = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.severe(String.format("File %s failed to read properly", file.getName()));
|
||||
log.throwing("fml.server.Loader", "attemptDirLoad", e);
|
||||
state = State.ERRORED;
|
||||
capturedError = e;
|
||||
}
|
||||
}
|
||||
|
||||
return foundAModClass;
|
||||
@@ -514,6 +524,7 @@ public class Loader
|
||||
{
|
||||
log.warning(String.format("Failed to load mod class %s in %s", classFileName, classSource.getAbsoluteFile()));
|
||||
log.throwing("fml.server.Loader", "attemptLoad", e);
|
||||
throw new LoaderException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public class LoaderException extends RuntimeException
|
||||
*/
|
||||
private static final long serialVersionUID = -5675297950958861378L;
|
||||
|
||||
public LoaderException(Exception wrapped)
|
||||
public LoaderException(Throwable wrapped)
|
||||
{
|
||||
super(wrapped);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user