mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
better problem reporting when DeclarationWrapper.createASTNodes fails
This commit is contained in:
parent
79f7c5e3ae
commit
57bc1229ab
1 changed files with 12 additions and 1 deletions
|
@ -1165,7 +1165,18 @@ public abstract class Parser extends ExpressionParser implements IParser
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e)
|
catch (ASTSemanticException e)
|
||||||
{
|
{
|
||||||
throwBacktrack(e.getProblem());
|
if( e.getProblem() == null )
|
||||||
|
{
|
||||||
|
IProblem p = problemFactory.createProblem( IProblem.SYNTAX_ERROR,
|
||||||
|
sdw.getStartingOffset(),
|
||||||
|
lastToken != null ? lastToken.getEndOffset() : 0,
|
||||||
|
sdw.getStartingLine(),
|
||||||
|
scanner.getCurrentFilename(),
|
||||||
|
EMPTY_STRING, false, true );
|
||||||
|
throwBacktrack( p );
|
||||||
|
} else {
|
||||||
|
throwBacktrack(e.getProblem());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( Exception e )
|
catch( Exception e )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue