public class FunctionExceptionLog extends Object
private FunctionExceptionLog fel = new FunctionExceptionLog();
************ more class content ***************
try { queryLib.kickClient(clientID, false, kickMSG); fel.clearException(Integer.parseInt(clientInfo.get("client_database_id"))); } catch (TS3ServerQueryException sqe) { if (!fel.existsException(sqe, Integer.parseInt(clientInfo.get("client_database_id")))) { fel.addException(sqe, Integer.parseInt(clientInfo.get("client_database_id"))); modClass.addLogEntry(configPrefix, JTS3ServerMod_Interface.ERROR_LEVEL_ERROR, "An error occurred while kicking client \"" + clientInfo.get("client_nickname") + "\" (db id: " + clientInfo.get("client_database_id") + ")!", false); modClass.addLogEntry(configPrefix, sqe, false); } }
TS3ServerQueryException
Constructor and Description |
---|
FunctionExceptionLog() |
Modifier and Type | Method and Description |
---|---|
void |
addException(TS3ServerQueryException exception)
Add the TS3ServerQueryException to the list.
|
void |
addException(TS3ServerQueryException exception,
int targetID)
Add the TS3ServerQueryException to the list, tied to an id (like a client database id).
|
void |
clearAllExceptions()
Clears all saved TS3ServerQueryExceptions.
|
void |
clearException(int targetID)
Clears the TS3ServerQueryException of the given id (like a client database id).
|
boolean |
existsException(TS3ServerQueryException exception)
Check if this exception was already saved.
|
boolean |
existsException(TS3ServerQueryException exception,
int targetID)
Check if this exception was already saved.
|
public void addException(TS3ServerQueryException exception)
exception
- The TS3ServerQueryException you want to addpublic void addException(TS3ServerQueryException exception, int targetID)
exception
- The TS3ServerQueryException you want to add.targetID
- An id (like a client database id) for the exception.public void clearAllExceptions()
public void clearException(int targetID)
targetID
- An id (like a client database id) of the exception.public boolean existsException(TS3ServerQueryException exception)
exception
- The TS3ServerQueryExceptiontrue
, if this exception was already saved, false
if not.public boolean existsException(TS3ServerQueryException exception, int targetID)
exception
- The TS3ServerQueryExceptiontargetID
- An id (like a client database id) of the exception.true
, if this exception was already saved, false
if not.