Removes stack trace printing
This commit is contained in:
@@ -355,7 +355,7 @@ public class Stargate extends JavaPlugin {
|
||||
try {
|
||||
this.configuration.load(new File(getDataFolder(), configFileName));
|
||||
} catch (IOException | InvalidConfigurationException e) {
|
||||
e.printStackTrace();
|
||||
logSevere("Unable to load the configuration! Message: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ public class Stargate extends JavaPlugin {
|
||||
try {
|
||||
this.configuration.save(new File(getDataFolder(), configFileName));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logSevere("Unable to save the configuration! Message: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -120,8 +120,8 @@ public final class LanguageLoader {
|
||||
|
||||
try {
|
||||
readChangedLanguageStrings(inputStream, language, currentLanguageValues);
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
} catch (IOException exception) {
|
||||
Stargate.logSevere("Unable to read language strings! Message: " + exception.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -464,7 +464,6 @@ public final class StargateConfig {
|
||||
currentConfiguration.save(new File(dataFolderPath, "config.yml.old"));
|
||||
} catch (IOException e) {
|
||||
Stargate.debug("StargateConfig::migrateConfig", "Unable to save old backup and do migration");
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -483,7 +482,6 @@ public final class StargateConfig {
|
||||
ColorConversion.NORMAL);
|
||||
} catch (IOException e) {
|
||||
Stargate.debug("StargateConfig::migrateConfig", "Unable to load config migration file");
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -511,9 +509,8 @@ public final class StargateConfig {
|
||||
|
||||
try {
|
||||
newConfiguration.save(new File(dataFolderPath, "config.yml"));
|
||||
} catch (IOException e) {
|
||||
} catch (IOException exception) {
|
||||
Stargate.debug("StargateConfig::migrateConfig", "Unable to save migrated config");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Stargate.getInstance().reloadConfig();
|
||||
|
@@ -310,9 +310,8 @@ public class Gate {
|
||||
layout.saveLayout(bufferedWriter);
|
||||
|
||||
bufferedWriter.close();
|
||||
} catch (IOException ex) {
|
||||
Stargate.logSevere(String.format("Could not save Gate %s - %s", filename, ex.getMessage()));
|
||||
ex.printStackTrace();
|
||||
} catch (IOException exception) {
|
||||
Stargate.logSevere(String.format("Could not save Gate %s - %s", filename, exception.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -82,8 +82,7 @@ public final class BungeeHelper {
|
||||
//Send the plugin message
|
||||
player.sendPluginMessage(Stargate.getInstance(), bungeeChannel, byteArrayOutputStream.toByteArray());
|
||||
} catch (IOException ex) {
|
||||
Stargate.logSevere("Error sending BungeeCord teleport packet");
|
||||
ex.printStackTrace();
|
||||
Stargate.logSevere("Error sending BungeeCord teleport packet! Message: " + ex.getMessage());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -107,9 +106,8 @@ public final class BungeeHelper {
|
||||
|
||||
//Send the plugin message
|
||||
player.sendPluginMessage(Stargate.getInstance(), bungeeChannel, byteArrayOutputStream.toByteArray());
|
||||
} catch (IOException ex) {
|
||||
Stargate.logSevere("Error sending BungeeCord connect packet");
|
||||
ex.printStackTrace();
|
||||
} catch (IOException exception) {
|
||||
Stargate.logSevere("Error sending BungeeCord connect packet! Message: " + exception.getMessage());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -137,9 +135,8 @@ public final class BungeeHelper {
|
||||
data = new byte[dataLength];
|
||||
//Read the message to the prepared array
|
||||
dataInputStream.readFully(data);
|
||||
} catch (IOException ex) {
|
||||
Stargate.logSevere("Error receiving BungeeCord message");
|
||||
ex.printStackTrace();
|
||||
} catch (IOException exception) {
|
||||
Stargate.logSevere("Error receiving BungeeCord message. Message: " + exception.getMessage());
|
||||
return null;
|
||||
}
|
||||
return new String(data);
|
||||
|
@@ -170,10 +170,9 @@ public final class PortalFileHelper {
|
||||
"Starting post loading tasks", world));
|
||||
doPostLoadTasks(world, needsToSaveDatabase);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Stargate.logSevere(String.format("Exception while reading stargates from %s: %d", database.getName(),
|
||||
lineIndex));
|
||||
e.printStackTrace();
|
||||
} catch (Exception exception) {
|
||||
Stargate.logSevere(String.format("Exception while reading stargates from %s: %d! Message: %s",
|
||||
database.getName(), lineIndex, exception.getMessage()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user