Skip to content

Commit

Permalink
Less stacktraces
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 27, 2013
1 parent b79e531 commit 0e29da0
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -55,8 +55,10 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

Class<? extends Trait> trait = CitizensAPI.getTraitFactory().getTraitClass(traitName.asString());

if (trait == null)
throw new CommandExecutionException("Trait not found: " + traitName.asString());
if (trait == null) {
dB.echoError("Trait not found: " + traitName.asString());
return;
}

switch (Toggle.valueOf(toggle.asString())) {

Expand Down

0 comments on commit 0e29da0

Please sign in to comment.