Removed DBOpException fatal field

This commit is contained in:
Rsl1122 2018-08-12 10:05:48 +03:00
parent 11e0b6b9ed
commit ac5095153e
4 changed files with 3 additions and 22 deletions

View File

@ -9,8 +9,6 @@ import java.sql.SQLException;
*/ */
public class DBOpException extends RuntimeException { public class DBOpException extends RuntimeException {
private boolean fatal = false;
public DBOpException(String message) { public DBOpException(String message) {
super(message); super(message);
} }
@ -23,11 +21,4 @@ public class DBOpException extends RuntimeException {
return new DBOpException("SQL Failed: " + sql + "; " + e.getMessage(), e); return new DBOpException("SQL Failed: " + sql + "; " + e.getMessage(), e);
} }
public boolean isFatal() {
return fatal;
}
public void setFatal(boolean fatal) {
this.fatal = fatal;
}
} }

View File

@ -74,11 +74,7 @@ public class InspectCommand extends CommandNode {
checkWebUserAndNotify(activeDB, sender); checkWebUserAndNotify(activeDB, sender);
Processing.submit(new InspectCacheRequestProcessor(uuid, sender, playerName, locale)); Processing.submit(new InspectCacheRequestProcessor(uuid, sender, playerName, locale));
} catch (DBOpException e) { } catch (DBOpException e) {
if (e.isFatal()) { sender.sendMessage("§eDatabase exception occurred: " + e.getMessage());
sender.sendMessage("§cFatal database exception occurred: " + e.getMessage());
} else {
sender.sendMessage("§eNon-Fatal database exception occurred: " + e.getMessage());
}
Log.toLog(this.getClass(), e); Log.toLog(this.getClass(), e);
} finally { } finally {
this.cancel(); this.cancel();

View File

@ -88,11 +88,7 @@ public class QInspectCommand extends CommandNode {
sendMessages(sender, container); sendMessages(sender, container);
} catch (DBOpException e) { } catch (DBOpException e) {
if (e.isFatal()) { sender.sendMessage("§eDatabase exception occurred: " + e.getMessage());
sender.sendMessage("§cFatal database exception occurred: " + e.getMessage());
} else {
sender.sendMessage("§eNon-Fatal database exception occurred: " + e.getMessage());
}
Log.toLog(this.getClass(), e); Log.toLog(this.getClass(), e);
} finally { } finally {
this.cancel(); this.cancel();

View File

@ -58,9 +58,7 @@ public class UUIDUtility {
try { try {
uuid = db.fetch().getUuidOf(playerName); uuid = db.fetch().getUuidOf(playerName);
} catch (DBOpException e) { } catch (DBOpException e) {
if (e.isFatal()) { Log.toLog(UUIDUtility.class, e);
Log.toLog(UUIDUtility.class, e);
}
} }
try { try {
if (uuid == null) { if (uuid == null) {