import { ILogicNode } from '@/interface/logic';
import { UIActionContext } from '../uiaction-context';
import { UILogicNodeBase } from './logic-node-base';
/**
 * 抛出异常节点
 *
 * @export
 * @class UILogicThrowExceptionNode
 */
export class UILogicThrowExceptionNode extends UILogicNodeBase {

    constructor() {
        super();
    }

    /**
     * 执行节点
     *
     * @param {ILogicNode} logicNode 逻辑节点模型数据
     * @param {UIActionContext} actionContext 界面逻辑上下文
     * @memberof UILogicThrowExceptionNode
     */
    public async executeNode(logicNode: ILogicNode, actionContext: UIActionContext) {
        // actionContext.actionContainer.$throw(logicNode.errorInfo);
        // actionContext.bindLastReturnParam(null);
        // console.log(`已完成执行${logicNode?.name}节点，操作参数数据如下:`);
        // if (actionContext.paramsMap && (actionContext.paramsMap.size > 0)) {
        //     for (let [key, value] of actionContext.paramsMap) {
        //         console.log(`${key}:`, value.getReal());
        //     }
        // }
    }
}