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 {
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;
}
}

View File

@ -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();

View File

@ -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();

View File

@ -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) {