mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
errormsgs
This commit is contained in:
2
.idea/runConfigurations/Terrarum.xml
generated
2
.idea/runConfigurations/Terrarum.xml
generated
@@ -1,7 +1,7 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Terrarum" type="JarApplication">
|
||||
<option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="VM_PARAMETERS" value="-ea -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="17" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Terrarum (no DEV MODE)" type="JarApplication">
|
||||
<option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" />
|
||||
<option name="VM_PARAMETERS" value="-Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="17" />
|
||||
|
||||
@@ -58,6 +58,7 @@ p {
|
||||
|
||||
pre {
|
||||
font-faminy: monospaced;
|
||||
font-size: 11px;
|
||||
color: #801;
|
||||
border: 1px solid #801;
|
||||
border-radius: 3px;
|
||||
@@ -139,7 +140,7 @@ emph {
|
||||
printStream.println("<h3>Module Info</h3>")
|
||||
printStream.println("<h4>Load Order</h4>")
|
||||
printStream.println("<ol>${ModMgr.loadOrder.joinToString(separator = "") { "<li>" +
|
||||
"$it <small>(" +
|
||||
"$it <small>(" +
|
||||
"${moduleMetaToText(ModMgr.moduleInfo[it] ?: ModMgr.moduleInfoErrored[it])}" +
|
||||
")</small></li>" }
|
||||
}</ol>")
|
||||
@@ -150,7 +151,7 @@ emph {
|
||||
printStream.println("<h4>Module Errors</h4>")
|
||||
System.err.println("== Module Errors ==")
|
||||
it.forEach {
|
||||
printStream.println("<p>From Module '<strong>${it.moduleName}</strong>' (${it.type}):</p>")
|
||||
printStream.println("<p>From Module <strong>${it.moduleName}</strong> (${it.type.toHTML()}):</p>")
|
||||
printStream.println("<pre>")
|
||||
it.cause?.printStackTrace(printStream)
|
||||
printStream.println("</pre>")
|
||||
@@ -172,4 +173,10 @@ emph {
|
||||
textArea.text = "<html><style type=\"text/css\">$css</style><body>$htmlSB</body></html>"
|
||||
}
|
||||
|
||||
private fun ModMgr.LoadErrorType.toHTML() = when(this) {
|
||||
ModMgr.LoadErrorType.YOUR_FAULT -> "caused by the module"
|
||||
ModMgr.LoadErrorType.MY_FAULT -> "caused by the game"
|
||||
ModMgr.LoadErrorType.NOT_EVEN_THERE -> "dependency not satisfied"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -267,7 +267,14 @@ object ModMgr {
|
||||
catch (noSuchModule: FileNotFoundException) {
|
||||
printmsgerr(this, "No such module: $moduleName, skipping...")
|
||||
|
||||
logError(LoadErrorType.NOT_EVEN_THERE, moduleName)
|
||||
logError(LoadErrorType.NOT_EVEN_THERE, moduleName, noSuchModule)
|
||||
|
||||
moduleInfo.remove(moduleName)?.let { moduleInfoErrored[moduleName] = it }
|
||||
}
|
||||
catch (noSuchModule2: ModuleDependencyNotSatisfied) {
|
||||
printmsgerr(this, noSuchModule2.message)
|
||||
|
||||
logError(LoadErrorType.NOT_EVEN_THERE, moduleName, noSuchModule2)
|
||||
|
||||
moduleInfo.remove(moduleName)?.let { moduleInfoErrored[moduleName] = it }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user