Make AbilityModuleManager handle all exceptions

This commit is contained in:
Jack Lin 2015-09-09 17:16:04 +12:00
parent ab0c2807c6
commit 4aa7a95782

View file

@ -354,15 +354,9 @@ public class AbilityModuleManager {
descriptions.put(ab.getName(), ab.getDescription()); descriptions.put(ab.getName(), ab.getDescription());
authors.put(ab.getName(), ab.getAuthor()); authors.put(ab.getName(), ab.getAuthor());
} }
catch (AbstractMethodError /* pre 1.6 BETA 8 */ | NoSuchMethodError /* catch (Exception e) { //If triggered means ability was made before specific version .
* pre ProjectKorra.log.warning("The ability " + ab.getName() + " was not able to load, if this message shows again please remove it!");
* 1 //ProjectKorra.log.warning("The ability " + ab.getName() + " is either broken or outdated. Please remove it!");
* .
* 7
* BETA
* 2
*/ e) { //If triggered means ability was made before commented versions
ProjectKorra.log.warning("The ability " + ab.getName() + " is either broken or outdated. Please remove it!");
e.printStackTrace(); e.printStackTrace();
ab.stop(); ab.stop();
abilities.remove(ab.getName()); abilities.remove(ab.getName());