summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/MinecraftServer.java
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2013-12-02 15:43:55 -0600
committerTravis Watkins <amaranth@ubuntu.com>2013-12-02 15:46:34 -0600
commit963cd5438a2b2f779b9e81cc7edd6357b5231463 (patch)
tree31a2d8244baf3f02d6538e7bac1cadadc948fc32 /src/main/java/net/minecraft/server/MinecraftServer.java
parentf3865064f82c3fa2fe6d6703f18c284b5529914a (diff)
downloadcraftbukkit-963cd5438a2b2f779b9e81cc7edd6357b5231463.tar
craftbukkit-963cd5438a2b2f779b9e81cc7edd6357b5231463.tar.gz
craftbukkit-963cd5438a2b2f779b9e81cc7edd6357b5231463.tar.lz
craftbukkit-963cd5438a2b2f779b9e81cc7edd6357b5231463.tar.xz
craftbukkit-963cd5438a2b2f779b9e81cc7edd6357b5231463.zip
Catch all exceptions in jansi initialization. Fixes BUKKIT-4936
Both log4j and our own jline/jansi initialization attempt to catch errors caused by jansi's use of native libraries. However both of them use the Exception type which does not catch all errors. On Windows Server 2008 R2 Enterprise without installing extra software the required C++ libraries are not available which causes an error that does not extend Exception. To ensure we catch all errors I've changed both of these to catch Throwable instead which gets us a working console minus jansi functionality.
Diffstat (limited to 'src/main/java/net/minecraft/server/MinecraftServer.java')
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cdc41b41..c6710622 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -116,7 +116,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
try {
this.reader = new ConsoleReader(System.in, System.out);
this.reader.setExpandEvents(false); // Avoid parsing exceptions for uncommonly used event designators
- } catch (Exception e) {
+ } catch (Throwable e) {
try {
// Try again with jline disabled for Windows users without C++ 2008 Redistributable
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");