Make sure, we fail early if we can't parse the code

This commit is contained in:
Andreas Dangel
2016-03-20 11:11:24 +01:00
parent 3d63f1a8bd
commit 50fac3a5cf

View File

@ -48,6 +48,10 @@ public class ApexParser {
final ApexTreeBuilder treeBuilder = new ApexTreeBuilder();
suppressMap = new HashMap<>();
if (astRoot == null) {
throw new ParseException("Couldn't parse the source - there is not root node - Syntax Error??");
}
ApexNode<UserClass> tree = treeBuilder.build(astRoot);
return tree;
} catch (IOException e) {