@Override
public void visitCtCatch(CtCatch catchBlock) {
enter(catchBlock);
ASTNodeData catchData = nodeDataStack.peek();
BpelCatchScope catchScope = new BpelCatchScope(catchData.scopeStack.peek());
catchData.scopeStack.push(catchScope);
scan(catchBlock.getAnnotations());
if (catchBlock.getBody() != null &&
catchBlock.getBody().getStatements() != null &&
catchBlock.getBody().getStatements().size() > 0){
scan(catchBlock.getParameter());
ASTNodeData paramNodeData = nodeDataStack.peek();
if (paramNodeData.activity != null)
catchScope.addActivity(paramNodeData.activity);
scan(catchBlock.getBody());
ASTNodeData bodyData = nodeDataStack.peek();
if (bodyData.activity != null)
catchScope.addActivity(bodyData.activity);
if (paramNodeData.typeRefName.equals("java.lang.Exception"))
catchData.isCatchAll = true;
else {
catchData.xsdType = paramNodeData.xsdType;
catchData.xsdTypeQName = paramNodeData.xsdTypeQName;
catchData.variable = paramNodeData.variable;
}
} else {
catchData.isCatchAll = true;
}
catchData.scopeStack.pop();
catchData.activity = catchScope.getActivity();
exit(catchBlock);
}