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

Added a message to ArrayStoreException.

This commit is contained in:
Sergey Prigogin 2012-08-27 14:49:49 -07:00
parent 34b49d5545
commit 1abc90f0b8

View file

@ -178,7 +178,13 @@ public class AbstractCPPClassSpecializationScope implements ICPPClassSpecializat
T[] newArray= array.clone();
for (int i = 0; i < newArray.length; i++) {
newArray[i]= (T) specialClass.specializeMember(array[i], point);
IBinding specializedMember = specialClass.specializeMember(array[i], point);
try {
newArray[i]= (T) specializedMember;
} catch (ArrayStoreException e) {
throw new ArrayStoreException("Can't cast " + specializedMember.getClass() + //$NON-NLS-1$
" to " + array.getClass().getComponentType().getName()); //$NON-NLS-1$
}
}
return newArray;
}