Show error popup if entity tracker fails to load

This commit is contained in:
Jonas Herzig
2017-05-21 12:42:13 +02:00
parent 0e0eaaa9a7
commit 391f304c5f

View File

@@ -5,6 +5,7 @@ import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture; import com.google.common.util.concurrent.SettableFuture;
import com.replaymod.core.ReplayMod; import com.replaymod.core.ReplayMod;
import com.replaymod.core.utils.Utils;
import com.replaymod.pathing.gui.GuiKeyframeRepository; import com.replaymod.pathing.gui.GuiKeyframeRepository;
import com.replaymod.pathing.player.RealtimeTimelinePlayer; import com.replaymod.pathing.player.RealtimeTimelinePlayer;
import com.replaymod.pathing.properties.CameraProperties; import com.replaymod.pathing.properties.CameraProperties;
@@ -564,7 +565,9 @@ public class GuiPathing {
@Override @Override
public void onFailure(@Nonnull Throwable t) { public void onFailure(@Nonnull Throwable t) {
popup.close(); String message = "Failed to load entity tracker, pathing will be unavailable.";
GuiReplayOverlay overlay = replayHandler.getOverlay();
Utils.error(LOGGER, overlay, CrashReport.makeCrashReport(t, message), popup::close);
} }
}); });
return false; return false;