From 2ac87acc8a6bed46e97a6de3d44a8347c7cbb59d Mon Sep 17 00:00:00 2001 From: HugoDaBosss Date: Sun, 6 Mar 2016 15:52:06 +0100 Subject: [PATCH 1/2] Make Metadata Rewriter exception output more clear --- .../myles/ViaVersion/metadata/MetadataRewriter.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java index 95d902318..4402152cb 100644 --- a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java +++ b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java @@ -118,12 +118,14 @@ public class MetadataRewriter { } } } catch (Exception e) { - if (type != null) { + System.out.println("INCLUDE THIS IN YOUR ERROR LOG!"); + if (type != null) System.out.println("An error occurred with entity meta data for " + type + " OldID: " + entry.oldID); - if (metaIndex != null) { - System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex()); - System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType()); - } + else + System.out.println("An error occurred with entity meta data for UNKOWN_ENTITY OldID: " + entry.oldID); + if (metaIndex != null) { + System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex()); + System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType()); } e.printStackTrace(); } From dfd4c5f93ebb81e0b99745c957248791982a46a3 Mon Sep 17 00:00:00 2001 From: HugoDaBosss Date: Sun, 6 Mar 2016 15:55:53 +0100 Subject: [PATCH 2/2] Formatting --- .../java/us/myles/ViaVersion/metadata/MetadataRewriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java index 4402152cb..3b3090cae 100644 --- a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java +++ b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java @@ -118,11 +118,11 @@ public class MetadataRewriter { } } } catch (Exception e) { - System.out.println("INCLUDE THIS IN YOUR ERROR LOG!"); + System.out.println("INCLUDE THIS IN YOUR ERROR LOG!"); if (type != null) System.out.println("An error occurred with entity meta data for " + type + " OldID: " + entry.oldID); else - System.out.println("An error occurred with entity meta data for UNKOWN_ENTITY OldID: " + entry.oldID); + System.out.println("An error occurred with entity meta data for UNKOWN_ENTITY OldID: " + entry.oldID); if (metaIndex != null) { System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex()); System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType());