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:
parent
34b49d5545
commit
1abc90f0b8
1 changed files with 7 additions and 1 deletions
|
@ -178,7 +178,13 @@ public class AbstractCPPClassSpecializationScope implements ICPPClassSpecializat
|
||||||
|
|
||||||
T[] newArray= array.clone();
|
T[] newArray= array.clone();
|
||||||
for (int i = 0; i < newArray.length; i++) {
|
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;
|
return newArray;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue