Update a few try-catch's to catch all exceptions.
This commit is contained in:
parent
d485b9b34b
commit
f560fa5b26
|
@ -56,7 +56,7 @@ public class ClassFileContainer
|
||||||
{
|
{
|
||||||
if (shouldParse())
|
if (shouldParse())
|
||||||
{
|
{
|
||||||
TypeSolver typeSolver = new CombinedTypeSolver(new ReflectionTypeSolver(false), new JarTypeSolver(path));
|
TypeSolver typeSolver = new CombinedTypeSolver(new ReflectionTypeSolver(true), new JarTypeSolver(path));
|
||||||
JavaParser parser = new JavaParser();
|
JavaParser parser = new JavaParser();
|
||||||
parser.getParserConfiguration().setSymbolResolver(new JavaSymbolSolver(typeSolver));
|
parser.getParserConfiguration().setSymbolResolver(new JavaSymbolSolver(typeSolver));
|
||||||
ParseResult<CompilationUnit> parse = parser.parse(this.content);
|
ParseResult<CompilationUnit> parse = parser.parse(this.content);
|
||||||
|
|
|
@ -347,7 +347,7 @@ public class MyVoidVisitor extends VoidVisitorAdapter<Object>
|
||||||
new ClassReferenceLocation(getOwner(classFileContainer),
|
new ClassReferenceLocation(getOwner(classFileContainer),
|
||||||
packagePath, "", "reference", classValue.line, classValue.columnStart, classValue.columnEnd + 1));
|
packagePath, "", "reference", classValue.line, classValue.columnStart, classValue.columnEnd + 1));
|
||||||
}
|
}
|
||||||
catch (ClassCastException | UnsupportedOperationException | IllegalArgumentException e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
printException(n, e);
|
printException(n, e);
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,7 @@ public class MyVoidVisitor extends VoidVisitorAdapter<Object>
|
||||||
signature, parameters, "declaration", constructor.line, constructor.columnStart,
|
signature, parameters, "declaration", constructor.line, constructor.columnStart,
|
||||||
constructor.columnEnd + 1));
|
constructor.columnEnd + 1));
|
||||||
}
|
}
|
||||||
catch (RuntimeException e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
printException(n, e);
|
printException(n, e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user