Heartstopper Commit
Enabled every catch block in the project to log parsed exceptions.
This commit is contained in:
@@ -216,7 +216,7 @@ public class AbstractPlayerInteraction {
|
||||
try {
|
||||
return getQuestStatus(quest) == MapleQuestStatus.Status.COMPLETED;
|
||||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -229,7 +229,7 @@ public class AbstractPlayerInteraction {
|
||||
try {
|
||||
return getQuestStatus(quest) == MapleQuestStatus.Status.STARTED;
|
||||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -461,7 +461,7 @@ public class AbstractPlayerInteraction {
|
||||
try {
|
||||
return Server.getInstance().getGuild(getPlayer().getGuildId(), getPlayer().getWorld(), null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -61,9 +61,7 @@ public class EventManager {
|
||||
public void cancel() {
|
||||
try {
|
||||
iv.invokeFunction("cancelSchedule", (Object) null);
|
||||
} catch (ScriptException ex) {
|
||||
ex.printStackTrace();
|
||||
} catch (NoSuchMethodException ex) {
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -77,9 +75,7 @@ public class EventManager {
|
||||
public void run() {
|
||||
try {
|
||||
iv.invokeFunction(methodName, eim);
|
||||
} catch (ScriptException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (NoSuchMethodException ex) {
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
@@ -95,9 +91,7 @@ public class EventManager {
|
||||
public void run() {
|
||||
try {
|
||||
iv.invokeFunction(methodName, (Object) null);
|
||||
} catch (ScriptException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (NoSuchMethodException ex) {
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
@@ -156,9 +150,7 @@ public class EventManager {
|
||||
EventInstanceManager eim = (EventInstanceManager) (iv.invokeFunction("setup", (Object) null));
|
||||
eim.registerExpedition(exped);
|
||||
exped.start();
|
||||
} catch (ScriptException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (NoSuchMethodException ex) {
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
@@ -168,9 +160,7 @@ public class EventManager {
|
||||
try {
|
||||
EventInstanceManager eim = (EventInstanceManager) (iv.invokeFunction("setup", (Object) null));
|
||||
eim.registerPlayer(chr);
|
||||
} catch (ScriptException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (NoSuchMethodException ex) {
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
@@ -180,9 +170,7 @@ public class EventManager {
|
||||
try {
|
||||
EventInstanceManager eim = (EventInstanceManager) (iv.invokeFunction("setup", (Object) null));
|
||||
eim.registerParty(party, map);
|
||||
} catch (ScriptException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (NoSuchMethodException ex) {
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
@@ -192,9 +180,7 @@ public class EventManager {
|
||||
try {
|
||||
iv.invokeFunction("setup", eim);
|
||||
eim.setProperty("leader", leader);
|
||||
} catch (ScriptException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (NoSuchMethodException ex) {
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ public class ItemScriptManager {
|
||||
try {
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ public class MapScriptManager {
|
||||
try {
|
||||
scripts.get(scriptName).invokeFunction("start", new MapScriptMethods(c));
|
||||
} catch (final ScriptException | NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -93,6 +94,7 @@ public class MapScriptManager {
|
||||
try {
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,6 +191,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
try {
|
||||
MapleQuest.getInstance(id).forceStart(getPlayer(), npc);
|
||||
} catch (NullPointerException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +199,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
try {
|
||||
MapleQuest.getInstance(id).forceComplete(getPlayer(), npc);
|
||||
} catch (NullPointerException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +207,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
try {
|
||||
MapleQuest.getInstance(id).forceStart(getPlayer(), npc);
|
||||
} catch (NullPointerException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,6 +215,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
try {
|
||||
MapleQuest.getInstance(id).forceComplete(getPlayer(), npc);
|
||||
} catch (NullPointerException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,8 +330,10 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
Skill skill = SkillFactory.getSkill(Integer.parseInt(skill_.getName()));
|
||||
getPlayer().changeSkillLevel(skill, (byte) 0, skill.getMaxLevel(), -1);
|
||||
} catch (NumberFormatException nfe) {
|
||||
nfe.printStackTrace();
|
||||
break;
|
||||
} catch (NullPointerException npe) {
|
||||
npe.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -368,6 +374,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
ps.close();
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -425,6 +432,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
Server.getInstance().addAlliance(id, alliance);
|
||||
Server.getInstance().allianceMessage(id, MaplePacketCreator.makeNewAlliance(alliance, chr1.getClient()), -1, -1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
return alliance;
|
||||
@@ -440,7 +448,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
return true;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
if (getPlayer().getMerchantMeso() == 0) {
|
||||
|
||||
@@ -68,6 +68,7 @@ public class PortalPlayerInteraction extends AbstractPlayerInteraction {
|
||||
rs.close();
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class PortalScriptManager {
|
||||
try {
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR CLOSING " + e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user