feat(REQ-4196) - 调整 workflowEngineException 的构造器,支持传入 Throwable
This commit is contained in:
parent
3b2b77d732
commit
52506df1ef
@ -19,6 +19,11 @@ public class WorkflowEngineException extends ServiceException {
|
||||
this.code = code.getRespCode();
|
||||
}
|
||||
|
||||
public WorkflowEngineException(IRespCode code, Throwable cause, String... params) {
|
||||
super(doFormat(code.getCode(), code.getMessage(), params), cause);
|
||||
this.code = code.getRespCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
|
||||
@ -27,7 +27,7 @@ public abstract class AbstractCommand<T> implements Command<T> {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.warn(e.getMessage(), e);
|
||||
throw new WorkflowEngineException(ENGINE_EXEC_EXCEPTION, e.getMessage());
|
||||
throw new WorkflowEngineException(ENGINE_EXEC_EXCEPTION, e, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user