mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Added warn notifications for dev mode error logs
This commit is contained in:
parent
7d64a4bfbb
commit
6d941766f1
@ -142,6 +142,7 @@ public class ConnectionOut {
|
||||
throw new ConnectionFailException("Connection timed out after 10 seconds.", e);
|
||||
} catch (NoSuchAlgorithmException | KeyManagementException | IOException e) {
|
||||
if (Settings.DEV_MODE.isTrue()) {
|
||||
Log.warn("THIS ERROR IS ONLY LOGGED IN DEV MODE:");
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
}
|
||||
ConnectionLog.logConnectionTo(toServer, infoRequest, -1);
|
||||
|
@ -52,7 +52,8 @@ public class RequestHandler implements HttpHandler {
|
||||
response.send(exchange);
|
||||
} catch (Exception e) {
|
||||
if (Settings.DEV_MODE.isTrue()) {
|
||||
e.printStackTrace();
|
||||
Log.warn("THIS ERROR IS ONLY LOGGED IN DEV MODE:");
|
||||
Log.toLog(this.getClass(), e);
|
||||
}
|
||||
} finally {
|
||||
exchange.close();
|
||||
|
@ -6,7 +6,6 @@ package com.djrapitops.plan.system.webserver.webapi;
|
||||
|
||||
import com.djrapitops.plan.api.exceptions.connection.*;
|
||||
import com.djrapitops.plan.system.info.server.ServerInfo;
|
||||
import com.djrapitops.plan.system.settings.Settings;
|
||||
import com.djrapitops.plan.system.webserver.response.Response;
|
||||
import com.djrapitops.plan.system.webserver.response.api.BadRequestResponse;
|
||||
import com.djrapitops.plan.system.webserver.response.api.SuccessResponse;
|
||||
@ -125,9 +124,6 @@ public abstract class WebAPI {
|
||||
} catch (SocketTimeoutException e) {
|
||||
throw new ConnectionFailException("Connection timed out after 10 seconds.", e);
|
||||
} catch (NoSuchAlgorithmException | KeyManagementException | IOException e) {
|
||||
if (Settings.DEV_MODE.isTrue()) {
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
}
|
||||
throw new ConnectionFailException("API connection failed. address: " + address, e);
|
||||
}
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ public class PlayersTableCreator {
|
||||
));
|
||||
} catch (NullPointerException e) {
|
||||
if (Settings.DEV_MODE.isTrue()) {
|
||||
Log.warn("THIS ERROR IS ONLY LOGGED IN DEV MODE:");
|
||||
Log.toLog(PlayersTableCreator.class.getName(), e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user