Skip to content

Commit

Permalink
Catch Error too
Browse files Browse the repository at this point in the history
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 5128f80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/laytonsmith/core/Script.java
Expand Up @@ -403,7 +403,11 @@ public Mixed eval(ParseTree c, final Environment env) throws CancelCommandExcept
e.setData(f.getName()); e.setData(f.getName());
} }
throw e; throw e;
} catch (Exception e) { } catch (Throwable e) {
if(e instanceof ThreadDeath) {
// Bail quickly in this case
throw e;
}
String brand = Implementation.GetServerType().getBranding(); String brand = Implementation.GetServerType().getBranding();
SimpleVersion version = Static.getVersion(); SimpleVersion version = Static.getVersion();


Expand Down

0 comments on commit 5128f80

Please sign in to comment.