mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
More detailed exception message.
This commit is contained in:
parent
9aa20f2270
commit
0d4b048d15
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,7 @@ import org.eclipse.cdt.core.dom.ast.ISemanticProblem;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||||
import org.eclipse.cdt.core.dom.ast.IValue;
|
import org.eclipse.cdt.core.dom.ast.IValue;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTAmbiguousTemplateArgument;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
|
||||||
|
@ -1706,6 +1707,10 @@ public class CPPTemplates {
|
||||||
IType type= expr.getExpressionType();
|
IType type= expr.getExpressionType();
|
||||||
IValue value= Value.create((IASTExpression) arg, Value.MAX_RECURSION_DEPTH);
|
IValue value= Value.create((IASTExpression) arg, Value.MAX_RECURSION_DEPTH);
|
||||||
result[i]= new CPPTemplateArgument(value, type);
|
result[i]= new CPPTemplateArgument(value, type);
|
||||||
|
} else if (arg instanceof ICPPASTAmbiguousTemplateArgument) {
|
||||||
|
throw new IllegalArgumentException(id.getRawSignature()
|
||||||
|
+ " contains an ambiguous template argument at position " + i + " in " //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
+ id.getContainingFilename());
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Unexpected type: " + arg.getClass().getName()); //$NON-NLS-1$
|
throw new IllegalArgumentException("Unexpected type: " + arg.getClass().getName()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue