Better warnings

This commit is contained in:
cyberpwn 2021-08-29 07:51:00 -04:00
parent 48c1db6a8a
commit 443aa0040c
2 changed files with 13 additions and 5 deletions

View File

@ -18,6 +18,7 @@
package com.volmit.iris.engine.framework;
import com.volmit.iris.Iris;
import com.volmit.iris.util.documentation.BlockCoordinates;
import com.volmit.iris.util.hunk.Hunk;
@ -32,6 +33,15 @@ public abstract class EngineAssignedModifier<T> extends EngineAssignedComponent
@BlockCoordinates
@Override
public void modify(int x, int z, Hunk<T> output, boolean multicore) {
try
{
onModify(x, z, output, multicore);
}
catch(Throwable e)
{
Iris.error("Modifier Failure: " + getName());
e.printStackTrace();
}
}
}

View File

@ -380,13 +380,11 @@ public class Mantle {
try {
return getSafe(x, z).get();
} catch (InterruptedException e) {
Iris.error("Failed to get Tectonic Plate " + x + " " + z + " Due to a thread intterruption");
Iris.warn("Failed to get Tectonic Plate " + x + " " + z + " Due to a thread intterruption (hotload?)");
Iris.reportError(e);
e.printStackTrace();
} catch (ExecutionException e) {
Iris.error("Failed to get Tectonic Plate " + x + " " + z + " Due to a thread execution exception");
Iris.warn("Failed to get Tectonic Plate " + x + " " + z + " Due to a thread execution exception (engine close?)");
Iris.reportError(e);
e.printStackTrace();
}
Iris.warn("Retrying to get " + x + " " + z + " Mantle Region");