diff --git a/core/src/main/java/com/volmit/iris/Iris.java b/core/src/main/java/com/volmit/iris/Iris.java index 6a4a4e0d7..35a6e6ab6 100644 --- a/core/src/main/java/com/volmit/iris/Iris.java +++ b/core/src/main/java/com/volmit/iris/Iris.java @@ -490,8 +490,6 @@ public class Iris extends VolmitPlugin implements Listener { checkForBukkitWorlds(); IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName()); IrisToolbelt.retainMantleDataForSlice(BlockData.class.getCanonicalName()); - - reportError(new Exception("This is a test")); }); } @@ -533,7 +531,7 @@ public class Iris extends VolmitPlugin implements Listener { } } catch (Throwable e) { e.printStackTrace(); - Sentry.captureException(e); + reportError(e); } } @@ -551,7 +549,7 @@ public class Iris extends VolmitPlugin implements Listener { }); }); } catch (IrisException e) { - Sentry.captureException(e); + reportError(e); } } } @@ -951,6 +949,7 @@ public class Iris extends VolmitPlugin implements Listener { private static void setupSentry() { var settings = IrisSettings.get().getSentry(); if (settings.disableAutoReporting || Sentry.isEnabled()) return; + Iris.info("Enabling Sentry for anonymous error reporting. You can disable this in the settings."); Sentry.init(options -> { options.setDsn("https://b16ecc222e9c1e0c48faecacb906fd89@o4509451052646400.ingest.de.sentry.io/4509452722765904"); if (settings.debug) { @@ -958,6 +957,8 @@ public class Iris extends VolmitPlugin implements Listener { options.setDebug(true); } + options.setEnableUncaughtExceptionHandler(false); + options.setRelease(Iris.instance.getDescription().getVersion()); options.setBeforeSend((event, hint) -> { event.setTag("iris.safeguard", IrisSafeguard.mode()); event.setTag("iris.nms", INMS.get().getClass().getCanonicalName()); diff --git a/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java b/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java index 5d6090b00..29d4fd80f 100644 --- a/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java +++ b/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java @@ -71,6 +71,11 @@ public class CommandDeveloper implements DecreeExecutor { .engineStatus(sender()); } + @Decree(description = "Send a test exception to sentry") + public void Sentry() { + Iris.reportError(new Exception("This is a test")); + } + @Decree(description = "Test") public void dumpThreads() { try {