mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-10 12:59:45 +01:00
modifying exception handling for completeSetup, now it will print the log and stack traces together
This commit is contained in:
parent
cbed9ac831
commit
c2bf481767
@ -2,6 +2,7 @@ package world.bentobox.bentobox;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -174,8 +175,15 @@ public class BentoBox extends JavaPlugin implements Listener {
|
|||||||
try {
|
try {
|
||||||
completeSetup(loadTime);
|
completeSetup(loadTime);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
fireCriticalError(e.getMessage(), "");
|
getLogger().log(Level.WARNING,
|
||||||
e.printStackTrace();
|
"unexpected exception occurred during completeSetup, Disabling BentoBox...", e);
|
||||||
|
// Do not save players or islands, just shutdown
|
||||||
|
shutdown = true;
|
||||||
|
// Stop all addons
|
||||||
|
if (addonsManager != null) {
|
||||||
|
addonsManager.disableAddons();
|
||||||
|
}
|
||||||
|
instance.setEnabled(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user