Permalink
Browse files

Catch Error too

This allows us to always (at least attempt) to print an error message.
While OOME will still leave us in a precarious state, we should at
least attempt to print out a helpful error message.
  • Loading branch information...
LadyCailin committed Nov 30, 2018
1 parent 4964181 commit 5128f80dd70ffe201913814e5ae02093fa597bf1
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/com/laytonsmith/core/Script.java
@@ -403,7 +403,11 @@ public Mixed eval(ParseTree c, final Environment env) throws CancelCommandExcept
e.setData(f.getName());
}
throw e;
} catch (Exception e) {
} catch (Throwable e) {
if(e instanceof ThreadDeath) {
// Bail quickly in this case
throw e;
}
String brand = Implementation.GetServerType().getBranding();
SimpleVersion version = Static.getVersion();

0 comments on commit 5128f80

Please sign in to comment.