JSON errors are sometimes IllegalStateExceptions. Fixes #43

This commit is contained in:
Olof Larsson 2013-09-15 10:06:14 +02:00
parent b9dd57b7e3
commit 91f9ec7c0c

View File

@ -518,9 +518,9 @@ public class Coll<E> implements CollInterface<E>
{ {
entry = this.getDriver().load(this, id); entry = this.getDriver().load(this, id);
} }
catch (JsonSyntaxException e) catch (Exception e)
{ {
MCore.get().log(Txt.parse("<b>Database could not load entity. Invalid JSON syntax. You edited a file manually and did it wrong?")); MCore.get().log(Txt.parse("<b>Database could not load entity. You edited a file manually and made wrong JSON?"));
MCore.get().log(Txt.parse("<k>Error: <v>%s", e.getMessage())); MCore.get().log(Txt.parse("<k>Error: <v>%s", e.getMessage()));
MCore.get().log(Txt.parse("<k>Entity: <v>%s", id)); MCore.get().log(Txt.parse("<k>Entity: <v>%s", id));
MCore.get().log(Txt.parse("<k>Collection: <v>%s", this.getName())); MCore.get().log(Txt.parse("<k>Collection: <v>%s", this.getName()));