From 2250f2f0bcf5e5345ec9bc412de01b53d4363f65 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 16 Mar 2020 01:08:45 -0400 Subject: [PATCH] Stack trace --- core/src/mindustry/core/ContentLoader.java | 1 + core/src/mindustry/mod/ContentParser.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/src/mindustry/core/ContentLoader.java b/core/src/mindustry/core/ContentLoader.java index fe81b7ce59..70b9f85f56 100644 --- a/core/src/mindustry/core/ContentLoader.java +++ b/core/src/mindustry/core/ContentLoader.java @@ -118,6 +118,7 @@ public class ContentLoader{ callable.get(content); }catch(Throwable e){ if(content.minfo.mod != null){ + Log.err(e); mods.handleContentError(content, e); }else{ throw new RuntimeException(e); diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 65b68b3423..7ad4bacc5a 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -454,6 +454,8 @@ public class ContentParser{ if(t.getMessage() != null && t instanceof JsonParseException){ builder.append("[accent][[JsonParse][] ").append(":\n").append(t.getMessage()); + }else if(t instanceof NullPointerException){ + builder.append(Strings.parseException(t, true)); }else{ Array causes = Strings.getCauses(t); for(Throwable e : causes){