Permalink
Browse files

Add a more helpful error message

  • Loading branch information...
LadyCailin committed Nov 30, 2018
1 parent 5128f80 commit 2c40de74e49696183e43fe92c4a95e8190086af7
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/main/java/com/laytonsmith/core/Script.java
@@ -428,6 +428,7 @@ public Mixed eval(ParseTree c, final Environment env) throws CancelCommandExcept
String emsg = TermColors.RED + "Uh oh! You've found an error in " + TermColors.CYAN + culprit + TermColors.RED + ".\n"
+ "This happened while running your code, so you may be able to find a workaround,"
+ (!(e instanceof Exception) ? " (though since this is an Error, maybe not)" : "")
+ " but is ultimately an issue in " + culprit + ".\n"
+ "The following code caused the error:\n" + TermColors.WHITE;

0 comments on commit 2c40de7

Please sign in to comment.