mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-12 06:48:50 +02:00
Prevented some error logs on reload
This commit is contained in:
parent
2b7f194d37
commit
ea873f798e
@ -4,6 +4,7 @@
|
||||
*/
|
||||
package com.djrapitops.plan.system.settings.theme;
|
||||
|
||||
import com.djrapitops.plan.PlanPlugin;
|
||||
import com.djrapitops.plan.api.exceptions.EnableException;
|
||||
import com.djrapitops.plan.system.SubSystem;
|
||||
import com.djrapitops.plan.system.settings.Settings;
|
||||
@ -69,6 +70,10 @@ public class Theme implements SubSystem {
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
} catch (IllegalStateException e) {
|
||||
if (!PlanPlugin.getInstance().isReloading()) {
|
||||
Log.error("Something went wrong with getting variable " + variable.name() + " for: " + path);
|
||||
}
|
||||
} catch (Exception | NoSuchFieldError e) {
|
||||
Log.error("Something went wrong with getting variable " + variable.name() + " for: " + path);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.djrapitops.plan.system.tasks.bukkit;
|
||||
|
||||
import com.djrapitops.plan.PlanPlugin;
|
||||
import com.djrapitops.plan.system.info.InfoSystem;
|
||||
import com.djrapitops.plan.system.info.connection.WebExceptionLogger;
|
||||
import com.djrapitops.plan.system.info.request.GenerateAnalysisPageRequest;
|
||||
@ -18,13 +19,20 @@ public class BootAnalysisTask extends AbsRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
String bootAnalysisRunMsg = Locale.get(Msg.ENABLE_BOOT_ANALYSIS_RUN_INFO).toString();
|
||||
Log.info(bootAnalysisRunMsg);
|
||||
if (!Analysis.isAnalysisBeingRun()) {
|
||||
WebExceptionLogger.logIfOccurs(this.getClass(), () ->
|
||||
InfoSystem.getInstance().sendRequest(new GenerateAnalysisPageRequest(ServerInfo.getServerUUID()))
|
||||
);
|
||||
try {
|
||||
String bootAnalysisRunMsg = Locale.get(Msg.ENABLE_BOOT_ANALYSIS_RUN_INFO).toString();
|
||||
Log.info(bootAnalysisRunMsg);
|
||||
if (!Analysis.isAnalysisBeingRun()) {
|
||||
WebExceptionLogger.logIfOccurs(this.getClass(), () ->
|
||||
InfoSystem.getInstance().sendRequest(new GenerateAnalysisPageRequest(ServerInfo.getServerUUID()))
|
||||
);
|
||||
}
|
||||
} catch (IllegalStateException e) {
|
||||
if (!PlanPlugin.getInstance().isReloading()) {
|
||||
Log.toLog(this.getClass(), e);
|
||||
}
|
||||
} finally {
|
||||
cancel();
|
||||
}
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.djrapitops.plan.system.tasks.bukkit;
|
||||
|
||||
import com.djrapitops.plan.PlanPlugin;
|
||||
import com.djrapitops.plan.system.info.InfoSystem;
|
||||
import com.djrapitops.plan.system.info.connection.WebExceptionLogger;
|
||||
import com.djrapitops.plan.system.info.request.GenerateAnalysisPageRequest;
|
||||
import com.djrapitops.plan.system.info.server.ServerInfo;
|
||||
import com.djrapitops.plan.utilities.analysis.Analysis;
|
||||
import com.djrapitops.plugin.api.utility.log.Log;
|
||||
import com.djrapitops.plugin.task.AbsRunnable;
|
||||
|
||||
public class PeriodicAnalysisTask extends AbsRunnable {
|
||||
@ -15,10 +17,18 @@ public class PeriodicAnalysisTask extends AbsRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!Analysis.isAnalysisBeingRun()) {
|
||||
WebExceptionLogger.logIfOccurs(this.getClass(), () ->
|
||||
InfoSystem.getInstance().sendRequest(new GenerateAnalysisPageRequest(ServerInfo.getServerUUID()))
|
||||
);
|
||||
try {
|
||||
if (!Analysis.isAnalysisBeingRun()) {
|
||||
WebExceptionLogger.logIfOccurs(this.getClass(), () ->
|
||||
InfoSystem.getInstance().sendRequest(new GenerateAnalysisPageRequest(ServerInfo.getServerUUID()))
|
||||
);
|
||||
}
|
||||
} catch (IllegalStateException e) {
|
||||
if (!PlanPlugin.getInstance().isReloading()) {
|
||||
Log.toLog(this.getClass(), e);
|
||||
}
|
||||
} finally {
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user