mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-25 02:27:43 +01:00
Removed DBOpException fatal field
This commit is contained in:
parent
11e0b6b9ed
commit
ac5095153e
@ -9,8 +9,6 @@ import java.sql.SQLException;
|
||||
*/
|
||||
public class DBOpException extends RuntimeException {
|
||||
|
||||
private boolean fatal = false;
|
||||
|
||||
public DBOpException(String message) {
|
||||
super(message);
|
||||
}
|
||||
@ -23,11 +21,4 @@ public class DBOpException extends RuntimeException {
|
||||
return new DBOpException("SQL Failed: " + sql + "; " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
public boolean isFatal() {
|
||||
return fatal;
|
||||
}
|
||||
|
||||
public void setFatal(boolean fatal) {
|
||||
this.fatal = fatal;
|
||||
}
|
||||
}
|
@ -74,11 +74,7 @@ public class InspectCommand extends CommandNode {
|
||||
checkWebUserAndNotify(activeDB, sender);
|
||||
Processing.submit(new InspectCacheRequestProcessor(uuid, sender, playerName, locale));
|
||||
} catch (DBOpException e) {
|
||||
if (e.isFatal()) {
|
||||
sender.sendMessage("§cFatal database exception occurred: " + e.getMessage());
|
||||
} else {
|
||||
sender.sendMessage("§eNon-Fatal database exception occurred: " + e.getMessage());
|
||||
}
|
||||
sender.sendMessage("§eDatabase exception occurred: " + e.getMessage());
|
||||
Log.toLog(this.getClass(), e);
|
||||
} finally {
|
||||
this.cancel();
|
||||
|
@ -88,11 +88,7 @@ public class QInspectCommand extends CommandNode {
|
||||
|
||||
sendMessages(sender, container);
|
||||
} catch (DBOpException e) {
|
||||
if (e.isFatal()) {
|
||||
sender.sendMessage("§cFatal database exception occurred: " + e.getMessage());
|
||||
} else {
|
||||
sender.sendMessage("§eNon-Fatal database exception occurred: " + e.getMessage());
|
||||
}
|
||||
sender.sendMessage("§eDatabase exception occurred: " + e.getMessage());
|
||||
Log.toLog(this.getClass(), e);
|
||||
} finally {
|
||||
this.cancel();
|
||||
|
@ -58,9 +58,7 @@ public class UUIDUtility {
|
||||
try {
|
||||
uuid = db.fetch().getUuidOf(playerName);
|
||||
} catch (DBOpException e) {
|
||||
if (e.isFatal()) {
|
||||
Log.toLog(UUIDUtility.class, e);
|
||||
}
|
||||
Log.toLog(UUIDUtility.class, e);
|
||||
}
|
||||
try {
|
||||
if (uuid == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user