Heartstopper Commit
Enabled every catch block in the project to log parsed exceptions.
This commit is contained in:
@@ -1145,8 +1145,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
|
||||
private void changeMapInternal(final MapleMap to, final Point pos, final byte[] warpPacket) {
|
||||
if (this.getTrade() != null) {
|
||||
MapleTrade.cancelTrade(this);
|
||||
}
|
||||
MapleTrade.cancelTrade(this);
|
||||
}
|
||||
client.announce(warpPacket);
|
||||
map.removePlayer(MapleCharacter.this);
|
||||
if (client.getChannelServer().getPlayerStorage().getCharacterById(getId()) != null) {
|
||||
@@ -1191,7 +1191,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
ps.execute();
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
System.out.print("Error deleting skill: " + ex);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1293,7 +1293,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
ps.execute();
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
System.out.print("Error deleting guild: " + ex);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1383,6 +1383,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
try {
|
||||
Server.getInstance().disbandGuild(guildid);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1955,6 +1956,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
try {
|
||||
return Server.getInstance().getGuild(getGuildId(), getWorld(), null);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2003,6 +2005,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
return id;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -2023,6 +2026,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
return name;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -2625,6 +2629,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4239,6 +4244,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
con.setAutoCommit(true);
|
||||
con.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4450,6 +4456,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
merchantmeso += add;
|
||||
@@ -4463,6 +4470,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
merchantmeso = set;
|
||||
@@ -4835,6 +4843,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5159,6 +5168,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -401,6 +401,7 @@ public class MapleClient {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,6 +430,7 @@ public class MapleClient {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,6 +536,7 @@ public class MapleClient {
|
||||
lTempban.setTimeInMillis(rs.getTimestamp("tempban").getTime());
|
||||
return lTempban;
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (ps != null) {
|
||||
@@ -543,6 +546,7 @@ public class MapleClient {
|
||||
rs.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;//why oh why!?!
|
||||
@@ -590,6 +594,7 @@ public class MapleClient {
|
||||
ps.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -623,6 +628,7 @@ public class MapleClient {
|
||||
ps.close();
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -724,6 +730,7 @@ public class MapleClient {
|
||||
try {
|
||||
merchant.saveItems(false);
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
System.out.println("Error while saving Hired Merchant items.");
|
||||
}
|
||||
}
|
||||
@@ -931,6 +938,7 @@ public class MapleClient {
|
||||
try {
|
||||
Server.getInstance().deleteGuildCharacter(new MapleGuildCharacter(cid, 0, rs.getString("name"), (byte) -1, (byte) -1, 0, rs.getInt("guildrank"), rs.getInt("guildid"), false, rs.getInt("allianceRank")));
|
||||
} catch (Exception re) {
|
||||
re.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -994,6 +1002,7 @@ public class MapleClient {
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}, 15000);
|
||||
@@ -1061,6 +1070,7 @@ public class MapleClient {
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return disconnectForBeingAFaggot;
|
||||
}
|
||||
@@ -1079,6 +1089,7 @@ public class MapleClient {
|
||||
rs.close();
|
||||
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
votePoints = points;
|
||||
return votePoints;
|
||||
@@ -1152,6 +1163,7 @@ public class MapleClient {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1180,6 +1192,7 @@ public class MapleClient {
|
||||
rs.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -48,6 +48,7 @@ public class MapleFamily {
|
||||
rs.close();
|
||||
getMapleFamily();
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +73,7 @@ public class MapleFamily {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException sqle) {
|
||||
sqle.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ public final class MonsterBook {
|
||||
ps.execute();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +417,7 @@ public class Commands {
|
||||
float chance = 1000000 / drop.chance / player.getDropRate();
|
||||
output += "- " + name + " (1/" + (int) chance + ")\r\n";
|
||||
} catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -629,6 +630,7 @@ public class Commands {
|
||||
rs.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -765,6 +767,7 @@ public class Commands {
|
||||
}
|
||||
player.changeMap(target, target.getPortal(0));
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
player.yellowMessage("Map ID " + sub[1] + " is invalid.");
|
||||
return false;
|
||||
}
|
||||
@@ -859,6 +862,7 @@ public class Commands {
|
||||
victim.getClient().disconnect(true, false);
|
||||
player.getMap().removePlayer(victim);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
@@ -961,6 +965,7 @@ public class Commands {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (sub[0].equals("item") || sub[0].equals("drop")) {
|
||||
int itemId = Integer.parseInt(sub[1]);
|
||||
@@ -968,6 +973,7 @@ public class Commands {
|
||||
try {
|
||||
quantity = Short.parseShort(sub[2]);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (sub[0].equals("item")) {
|
||||
int petid = -1;
|
||||
@@ -1077,8 +1083,10 @@ public class Commands {
|
||||
player.changeSkillLevel(skill, (byte) skill.getMaxLevel(), skill.getMaxLevel(), -1);
|
||||
}
|
||||
} catch (NumberFormatException nfe) {
|
||||
nfe.printStackTrace();
|
||||
break;
|
||||
} catch (NullPointerException npe) {
|
||||
npe.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1099,6 +1107,7 @@ public class Commands {
|
||||
is.close();
|
||||
packet = packetProps.getProperty("pe");
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
player.yellowMessage("Failed to load pe.txt");
|
||||
return false;
|
||||
}
|
||||
@@ -1223,6 +1232,7 @@ public class Commands {
|
||||
p.executeUpdate();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
player.message("Failed to unban " + sub[1]);
|
||||
return true;
|
||||
}
|
||||
@@ -1249,6 +1259,7 @@ public class Commands {
|
||||
ps.close();
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
c.getPlayer().message("Error occured while banning IP address");
|
||||
c.getPlayer().message(target.getName() + "'s IP was not banned: " + ip);
|
||||
}
|
||||
@@ -1317,6 +1328,7 @@ public class Commands {
|
||||
player.saveToDB();//To set the new world :O (true because else 2 player instances are created, one in both worlds)
|
||||
c.announce(MaplePacketCreator.getChannelChange(InetAddress.getByName(socket[0]), Integer.parseInt(socket[1])));
|
||||
} catch (UnknownHostException | NumberFormatException ex) {
|
||||
ex.printStackTrace();
|
||||
player.message("Error when trying to change worlds, are you sure the world you are trying to warp to has the same amount of channels?");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user