1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

More informative exception.

This commit is contained in:
Sergey Prigogin 2012-06-20 15:29:33 -07:00
parent 13ae05e783
commit 5eb8410fbd

View file

@ -1623,8 +1623,8 @@ public class CPPTemplates {
/** /**
* @param id the template id containing the template arguments * @param id the template id containing the template arguments
* @return an array of template arguments, currently modeled as IType objects. The * @return an array of template arguments, currently modeled as IType objects.
* empty IType array is returned if id is <code>null</code> * The empty ICPPTemplateArgument array is returned if id is <code>null</code>
*/ */
public static ICPPTemplateArgument[] createTemplateArgumentArray(ICPPASTTemplateId id) { public static ICPPTemplateArgument[] createTemplateArgumentArray(ICPPASTTemplateId id) {
ICPPTemplateArgument[] result= ICPPTemplateArgument.EMPTY_ARGUMENTS; ICPPTemplateArgument[] result= ICPPTemplateArgument.EMPTY_ARGUMENTS;
@ -1641,7 +1641,7 @@ public class CPPTemplates {
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 { } else {
throw new IllegalArgumentException(); throw new IllegalArgumentException("Unexpected type: " + arg.getClass().getName()); //$NON-NLS-1$
} }
} }
} }