BUG527:エラーの共通処理追加

This commit is contained in:
xiaozhe.ma
2024-07-31 18:28:25 +09:00
parent 96722d9c2f
commit b6a68198f5
23 changed files with 345 additions and 123 deletions

View File

@@ -30,12 +30,12 @@ export class ErrorShowAction implements IAction {
* @param event
* @returns
*/
async process(actionNode: IActionNode, event: any, context: IContext): Promise<IActionResult> { //异步处理某函数下的xx属性
async process(actionNode: IActionNode, event: any, context: IContext): Promise<IActionResult> {
let result = {
canNext: true,
result: false
};
try { //尝试执行以下代码部分
try {
this.actionProps = actionNode.actionProps;
if (!('message' in actionNode.ActionValue) && !('condition' in actionNode.ActionValue)) { //如果message以及condition两者都不存在的情况下return
return result
@@ -52,8 +52,7 @@ export class ErrorShowAction implements IAction {
}
return result;
} catch (error) {
event.error = error;
console.error(error);
context.errors.handleError(error,actionNode);
result.canNext = false;
return result;
}