📄 staxthrowaction.java
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF) *//* (C) Copyright IBM Corp. 2002 *//* *//* This software is licensed under the Common Public License (CPL) V1.0. *//*****************************************************************************/package com.ibm.staf.service.stax;import com.ibm.staf.*;import java.util.*;import java.text.*;public class STAXThrowAction implements STAXAction{ public STAXThrowAction(String exceptionName, String data) { fExceptionName = exceptionName; fUnevalExceptionName = exceptionName; fExceptionData = data; fUnevalExceptionData = data; } public String getXMLInfo() { return "<throw exception=\"" + fExceptionName + "\">" + fExceptionData + "</throw>"; } public String getInfo() { return fExceptionName; } public String getDetails() { return "ExceptionName:" + fExceptionName + ";ExceptionData:" + fExceptionData; } public void execute(STAXThread thread) { thread.popAction(); try { fExceptionName = thread.pyStringEval(fUnevalExceptionName); fExceptionData = thread.pyStringEval(fUnevalExceptionData); } catch (STAXPythonEvaluationException e) { thread.popAction(); thread.setSignalMsgVar("STAXPythonEvalMsg", getXMLInfo(), e); thread.raiseSignal("STAXPythonEvaluationError"); return; } thread.addCondition(new STAXExceptionCondition(fExceptionName, fExceptionData)); } public void handleCondition(STAXThread thread, STAXCondition cond) { thread.popAction(); } public STAXAction cloneAction() { return new STAXThrowAction(fUnevalExceptionName, fUnevalExceptionData); } private String fUnevalExceptionName; private String fExceptionName; private String fUnevalExceptionData; private String fExceptionData;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -