Commit 292270fb by fukai

支持退出交易异常

parent 8bc6463e
package org.sss.presentation.noui.api.exception;
public class ExitTransactionException extends RuntimeException {
private String errorCode;
public ExitTransactionException(String message, String errorCode) {
super(message);
this.errorCode = errorCode;
}
public String getErrorCode() {
return errorCode;
}
}
......@@ -8,6 +8,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import org.sss.common.model.*;
import org.sss.presentation.noui.api.exception.ExitTransactionException;
import org.sss.presentation.noui.api.exception.NoUiException;
import org.sss.presentation.noui.api.model.Alias;
import org.sss.presentation.noui.api.request.NoUiRequest;
......@@ -181,7 +182,12 @@ public abstract class AbstractCommonController {
ret = ResultUtil.result(NoUiPresentationUtil.retCode(context), NoUiPresentationUtil.retMsg(context), afterReturnData,paginationData,
NoUiPresentationUtil.handleErrorReturnData(context, alias), NoUiPresentationUtil.handleCodeTableReturnData(context, alias), noUiVersion.getVersion());
} catch (Throwable e) {
}
catch (ExitTransactionException exitTrans)
{
ret = ResultUtil.result(exitTrans.getErrorCode(), exitTrans.getMessage(), "service error", noUiVersion.getVersion());
}
catch (Throwable e) {
log.error("OnClick command error", e);
ret = ResultUtil.result(ErrorCodes.ERROR, "hander error", "service error", noUiVersion.getVersion());
TxInfo.recordException(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment