forked from MagicBane/Server
Try Catch
This commit is contained in:
@@ -12,6 +12,7 @@ import engine.Enum;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
@@ -54,6 +55,7 @@ public class ItemTemplate {
|
||||
|
||||
public ItemTemplate(JSONObject jsonObject) {
|
||||
|
||||
try {
|
||||
// Reading a String
|
||||
|
||||
obj_name = (String) jsonObject.get("obj_name");
|
||||
@@ -163,6 +165,9 @@ public class ItemTemplate {
|
||||
int skill_level = ((Long) skill_req.get("skill_level")).intValue();
|
||||
item_skill_required.put(Enum.CharacterSkills.valueOf(skill_type), skill_level);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user