Heartstopper Commit
Enabled every catch block in the project to log parsed exceptions.
This commit is contained in:
@@ -124,6 +124,7 @@ public final class Channel {
|
||||
finishedShutdown = true;
|
||||
System.out.println("Successfully shut down Channel " + channel + " on World " + world + "\r\n");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("Error while shutting down Channel " + channel + " on World " + world + "\r\n" + e);
|
||||
}
|
||||
}
|
||||
@@ -138,9 +139,9 @@ public final class Channel {
|
||||
hmit.remove();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
wlock.unlock();
|
||||
wlock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ public class BuddylistModifyHandler extends AbstractMaplePacketHandler {
|
||||
c.announce(MaplePacketCreator.serverNotice(1, "A character called \"" + addName + "\" does not exist"));
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
ble.changeGroup(group);
|
||||
@@ -185,6 +186,7 @@ public class BuddylistModifyHandler extends AbstractMaplePacketHandler {
|
||||
notifyRemoteChannel(c, channel, otherCid, ADDED);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
nextPendingRequest(c);
|
||||
|
||||
@@ -238,6 +238,7 @@ public final class CashOperationHandler extends AbstractMaplePacketHandler {
|
||||
try {
|
||||
chr.sendNote(partner.getName(), text, (byte) 1);
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
partner.showNote();
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ public final class CouponCodeHandler extends AbstractMaplePacketHandler {
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
switch (type) {
|
||||
@@ -98,6 +99,7 @@ public final class CouponCodeHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@@ -113,6 +115,7 @@ public final class CouponCodeHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return validcode;
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ public final class EnterMTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
c.announce(MaplePacketCreator.sendMTS(items, 1, 0, 0, pages));
|
||||
c.announce(MaplePacketCreator.transferInventory(getTransfer(chr.getId())));
|
||||
@@ -163,6 +164,7 @@ public final class EnterMTSHandler extends AbstractMaplePacketHandler {
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return items;
|
||||
}
|
||||
@@ -208,6 +210,7 @@ public final class EnterMTSHandler extends AbstractMaplePacketHandler {
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ public class FredrickHandler extends AbstractMaplePacketHandler {
|
||||
}
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ public final class HiredMerchantRequest extends AbstractMaplePacketHandler {
|
||||
chr.announce(MaplePacketCreator.retrieveFirstMessage());
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
chr.dropMessage(1, "You already have a store open.");
|
||||
|
||||
@@ -202,6 +202,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
ps.close();
|
||||
MapleInventoryManipulator.removeFromSlot(c, type, slot, quantity, false);
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
c.getPlayer().gainMeso(-5000, false);
|
||||
c.announce(MaplePacketCreator.MTSConfirmSell());
|
||||
@@ -329,6 +330,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("MTS Transfer error: " + e);
|
||||
}
|
||||
} else if (op == 9) { //add to cart
|
||||
@@ -441,6 +443,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
c.announce(MaplePacketCreator.MTSFailBuy());
|
||||
}
|
||||
} else if (op == 17) { //buy from cart
|
||||
@@ -498,6 +501,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
c.announce(MaplePacketCreator.MTSFailBuy());
|
||||
}
|
||||
} else {
|
||||
@@ -551,6 +555,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return items;
|
||||
}
|
||||
@@ -616,6 +621,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return MaplePacketCreator.sendMTS(items, 4, 0, 0, pages);
|
||||
}
|
||||
@@ -663,6 +669,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return items;
|
||||
}
|
||||
@@ -735,6 +742,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
rs.close();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return MaplePacketCreator.sendMTS(items, tab, type, page, pages); // resniff
|
||||
}
|
||||
@@ -828,6 +836,7 @@ public final class MTSHandler extends AbstractMaplePacketHandler {
|
||||
ps.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return MaplePacketCreator.sendMTS(items, tab, type, page, pages);
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ public final class PlayerLoggedinHandler extends AbstractMaplePacketHandler {
|
||||
pss.executeUpdate();
|
||||
pss.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
c.announce(MaplePacketCreator.sendDueyMSG((byte) 0x1B));
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public final class RingActionHandler extends AbstractMaplePacketHandler {
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
c.getPlayer().dropMessage(1, "Your engagement has been broken up.");
|
||||
break;
|
||||
|
||||
@@ -47,6 +47,7 @@ public final class SpouseChatHandler extends AbstractMaplePacketHandler {
|
||||
// } else
|
||||
// c.getPlayer().message("You are either not married or your spouse is currently offline.");
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// c.getPlayer().message("You are either not married or your spouse is currently offline.");
|
||||
// c.getChannelServer().reconnectWorld();
|
||||
// }
|
||||
|
||||
@@ -357,6 +357,7 @@ public final class UseCashItemHandler extends AbstractMaplePacketHandler {
|
||||
try {
|
||||
player.sendNote(sendTo, msg, (byte) 0);
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
remove(c, itemId);
|
||||
} else if (itemType == 510) {
|
||||
|
||||
Reference in New Issue
Block a user