Do not stop the visit of AST if an error happens#196
Conversation
edd7206 to
cd76708
Compare
|
Github has some overload problems :( |
|
I wonder if the failing tests are not because there are try catch but error are caught by the new robustness mechanism :/ To investigate further |
cd76708 to
60f9d0e
Compare
|
@NicolasAnquetil Is that fine with you? |
60f9d0e to
2612ce2
Compare
ouf ... using reflexive API to access a private method of the JDT library :-( I agree with you that |
|
Why don't you catch the error that you have in the appropriate |
|
or even better, why not correcting the meta-model to accept the "right thing" which is in this case that arrays of primitive type can be TypeArgument |
|
About the error catching: About the fix of the problem: The goal of this PR is to make VVJ more robust in general, not just for the specific issue I got. Also if in the future we introduce new bugs, this will reduce the impact of those bugs. I am open to another way to do this (Java is really not my specialty so we can probably do better!) but I'm not sure it will be simpler to override each visit methods |
|
I understand the need (not stopping the visit in case of error) and I even agree with it. I propose one of the following:
public <T extends TParametricEntity> TParametricAssociation buildFamixParametricAssociation(TParametricAssociation association, ITypeBinding[] genericTypes, ITypeBinding[] typeArguments
) {
Iterator<ITypeBinding> genericIterator = Arrays.asList(genericTypes).iterator();
Iterator<ITypeBinding> concreteIterator = Arrays.asList(typeArguments).iterator();
while (concreteIterator.hasNext() && genericIterator.hasNext()) {
try {
TTypeArgument typeArgument = (TTypeArgument)ensureFamixType(concreteIterator.next());
TypeParameter typeParameter = (TypeParameter)ensureFamixType(genericIterator.next());
Concretization concretization = ensureFamixConcretization(typeArgument, typeParameter);
association.addConcretization(concretization);
}
catch (ClassCastException e) {
System.err.println("Stumbling on issue https://github.com/moosetechnology/VerveineJ/issues/197 again");
}
}
return association;
} |
|
I can tell Imen to use this branch for now but she will need to compile the jar. The second solution is not good enough since it's not the only problem I think. To have a clean fix for this problem do you have an idea other than overriding all the #visit methods? |
|
@NicolasAnquetil I tried your solution of overriding #visit methods but this does not work because we do not always call To keep this somewhere, here is the file to implement this solution: package fr.inria.verveine.extractor.java.visitors;
import org.eclipse.jdt.core.dom.*;
/**
* I am an abstract visitor to catch all errors during a visit to keep visiting the AST if an error happens somewhere.
*/
public abstract class VerveineJSafeVisitor extends ASTVisitor {
public boolean visit(AnnotationTypeDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(AnnotationTypeMemberDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(AnonymousClassDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ArrayAccess node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ArrayCreation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ArrayInitializer node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ArrayType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(AssertStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(Assignment node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(Block node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(BlockComment node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(BooleanLiteral node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(BreakStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(CaseDefaultExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(CastExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(CatchClause node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(CharacterLiteral node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ClassInstanceCreation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(CompilationUnit node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ConditionalExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ConstructorInvocation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ContinueStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(CreationReference node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(DoStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(EmptyStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(EnhancedForStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(EnumConstantDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(EnumDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ExportsDirective node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ExpressionMethodReference node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ExpressionStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(Dimension node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(FieldAccess node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(FieldDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ForStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(GuardedPattern node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(IfStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ImportDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(InfixExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(Initializer node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(InstanceofExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(IntersectionType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(Javadoc node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(JavaDocRegion node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(JavaDocTextElement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(LabeledStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(LambdaExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(LineComment node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(MarkerAnnotation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(MemberRef node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(MemberValuePair node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(MethodRef node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(MethodRefParameter node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(MethodDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(MethodInvocation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(Modifier node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ModuleDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ModuleModifier node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(NameQualifiedType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(NormalAnnotation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(NullLiteral node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(NullPattern node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(NumberLiteral node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(OpensDirective node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(PackageDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ParameterizedType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ParenthesizedExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(PatternInstanceofExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(PostfixExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(PrefixExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(PrimitiveType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ProvidesDirective node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(QualifiedName node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(QualifiedType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ModuleQualifiedName node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(RequiresDirective node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(RecordDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(RecordPattern node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(EitherOrMultiPattern node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ReturnStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SimpleName node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SimpleType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SingleMemberAnnotation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SingleVariableDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(StringLiteral node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SuperConstructorInvocation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SuperFieldAccess node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SuperMethodInvocation node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SuperMethodReference node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SwitchCase node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SwitchExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SwitchStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(SynchronizedStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TagElement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TagProperty node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TextBlock node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TextElement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ThisExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ThrowStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TryStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TypeDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TypeDeclarationStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TypeLiteral node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TypeMethodReference node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TypeParameter node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(TypePattern node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(UnionType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(UsesDirective node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(VariableDeclarationExpression node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(VariableDeclarationStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(VariableDeclarationFragment node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(WhileStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(WildcardType node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(YieldStatement node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
public boolean visit(ImplicitTypeDeclaration node) {
try {
return super.visit(node);
} catch (Exception e) {
e.printStackTrace(); //If an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
return true;
}
}
} |
Fixes #193
Fixes #191
Adding a try/catch to not stop the visit if an error happens