mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 21:20:12 +00:00
Improve mod loading error message for errors inside mod constructors (#9708)
Co-authored-by: Jab125 <[email protected]>
This commit is contained in:
1 parent
664a2c06ad
commit
dfef5101f1
3 files changed
+29
No files matched your search
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.debug;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
/**
|
||||
* Test that the mod loading error screen shows the cause of the crash when a mod constructor throws an exception.
|
||||
* <p>Enable or disable this test in the mods.toml</p>
|
||||
*/
|
||||
@Mod("constructor_throw_test")
|
||||
public class ConstructorThrowTest {
|
||||
public ConstructorThrowTest() {
|
||||
throw new RuntimeException("Test");
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,9 @@ modId="mdk_datagen"
|
||||
[[mods]]
|
||||
modId="custom_preset_editor_test"
|
||||
|
||||
#[[mods]]
|
||||
# modId="constructor_throw_test"
|
||||
|
||||
# LEGACY TEST CASES
|
||||
###### The mods below are from the old test framework and need to be yeeted later again.
|
||||
|
||||
|
||||
Reference in new issue
Block a user