From 752a972ed3f9a33c051c4479557dba136dd35917 Mon Sep 17 00:00:00 2001 From: johni0702 Date: Thu, 16 Jul 2015 14:46:41 +0200 Subject: [PATCH] Throw ReportedException when catching an exception thrown during rendering --- .../eu/crushedpixel/replaymod/replay/ReplayProcess.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java b/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java index f9a91c2d..4ad57c85 100755 --- a/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java +++ b/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java @@ -2,8 +2,8 @@ package eu.crushedpixel.replaymod.replay; import eu.crushedpixel.replaymod.ReplayMod; import eu.crushedpixel.replaymod.chat.ChatMessageHandler.ChatMessageType; -import eu.crushedpixel.replaymod.holders.Keyframe; import eu.crushedpixel.replaymod.holders.AdvancedPosition; +import eu.crushedpixel.replaymod.holders.Keyframe; import eu.crushedpixel.replaymod.holders.TimestampValue; import eu.crushedpixel.replaymod.interpolation.GenericLinearInterpolation; import eu.crushedpixel.replaymod.interpolation.GenericSplineInterpolation; @@ -16,6 +16,8 @@ import lombok.Getter; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiErrorScreen; import net.minecraft.client.resources.I18n; +import net.minecraft.crash.CrashReport; +import net.minecraft.util.ReportedException; import java.io.IOException; @@ -114,6 +116,9 @@ public class ReplayProcess { GuiErrorScreen errorScreen = new GuiErrorScreen(I18n.format("replaymod.gui.rendering.error.title"), I18n.format("replaymod.gui.rendering.error.message")); mc.displayGuiScreen(errorScreen); + } catch (Throwable t) { + CrashReport crashReport = CrashReport.makeCrashReport(t, "Rendering video"); + throw new ReportedException(crashReport); } finally { isVideoRecording = false; stopReplayProcess(success);