mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 23:22:10 -07:00
Improve Timings stack protection more
Ensures in more places that exceptions will not corrupt the Timings stack. Timings will now better report stack corruption and auto repair itself too.
This commit is contained in:
@@ -462,7 +462,7 @@ index 000000000..5582999fe
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index f7ec2e55f..f52d91d19 100644
|
||||
index 6a786b8c5..682d27f94 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||
@@ -477,13 +477,13 @@ index f7ec2e55f..f52d91d19 100644
|
||||
import org.bukkit.Server;
|
||||
@@ -0,0 +0,0 @@ public class SimpleCommandMap implements CommandMap {
|
||||
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
|
||||
target.timings.stopTiming(); // Spigot
|
||||
} // target.timings.stopTiming(); // Spigot // Paper
|
||||
} catch (CommandException ex) {
|
||||
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper
|
||||
target.timings.stopTiming(); // Spigot
|
||||
//target.timings.stopTiming(); // Spigot // Paper
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
target.timings.stopTiming(); // Spigot
|
||||
//target.timings.stopTiming(); // Spigot // Paper
|
||||
- throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex);
|
||||
+ String msg = "Unhandled exception executing '" + commandLine + "' in " + target;
|
||||
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper
|
||||
|
Reference in New Issue
Block a user