scan(throwStatement.getAnnotations());
scan(throwStatement.getThrownExpression());
ASTNodeData exprData = nodeDataStack.peek();
Throw throwStmt = BPELFactory.eINSTANCE.createThrow();
throwData.activity = throwStmt;
if (exprData.constructor != null && exprData.constructorArgElementMap != null && exprData.constructorArgs != null){
if (throwData.scopeStack != null){
Variable variable = createTempVariable(throwData.scopeStack, exprData.xsdType);
Assign assign = BPELFactory.eINSTANCE.createAssign();
createNewException(assign,variable,exprData.constructorArgElementMap,exprData.constructorArgs);
throwData.scopeStack.peek().addActivity(assign);
throwStmt.setFaultName(exprData.xsdTypeQName);
throwStmt.setFaultVariable(variable);
}
} else if (exprData.variable != null && exprData.xsdTypeQName != null){
throwStmt.setFaultName(exprData.xsdTypeQName);
throwStmt.setFaultVariable(exprData.variable);
} else if (exprData.typeRefName != null && exprData.typeRefName.equals("java.lang.Exception")){
// how do we handle this?
}
exit(throwStatement);