Skip to content

Commit

Permalink
BusinessException
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Aug 1, 2018
1 parent 7bc7090 commit 190a3d8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.hswebframework.expands.script.engine.DynamicScriptEngine;
import org.hswebframework.expands.script.engine.DynamicScriptEngineFactory;
import org.hswebframework.expands.script.engine.ExecuteResult;
import org.hswebframework.web.BusinessException;
import org.hswebframework.web.authorization.Authentication;
import org.hswebframework.web.authorization.AuthenticationHolder;
import org.hswebframework.web.authorization.AuthenticationPredicate;
Expand Down Expand Up @@ -153,7 +154,7 @@ protected <T> Consumer<T> createTaskEventListener(ListenerConfig listenerConfig)
context.put("event", event);
ExecuteResult result = engine.execute(scriptId, context);
if (!result.isSuccess()) {
throw new RuntimeException("执行监听器失败:" + result.getMessage(), result.getException());
throw new BusinessException("执行监听器失败:" + result.getMessage(), result.getException());
}
};
} else {
Expand Down

0 comments on commit 190a3d8

Please sign in to comment.