debug log structure exception

This commit is contained in:
dfsek
2021-01-14 21:26:05 -07:00
parent 87f7af1e1b
commit 25f6f3dbe1
@@ -142,11 +142,14 @@ public class StructureScript {
} }
private boolean applyBlock(TerraImplementationArguments arguments) { private boolean applyBlock(TerraImplementationArguments arguments) {
try { synchronized(block) {
return !block.apply(arguments).getLevel().equals(Block.ReturnLevel.FAIL); try {
} catch(RuntimeException e) { return !block.apply(arguments).getLevel().equals(Block.ReturnLevel.FAIL);
main.getLogger().severe("Failed to generate structure at " + arguments.getBuffer().getOrigin() + ": " + e.getMessage()); } catch(RuntimeException e) {
return false; main.getLogger().severe("Failed to generate structure at " + arguments.getBuffer().getOrigin() + ": " + e.getMessage());
Debug.stack(e);
return false;
}
} }
} }
} }