Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-08-27 17:49:49 -0400
committerSergey Prigogin2012-08-27 19:02:50 -0400
commit1abc90f0b876c18976842063b1746c071859836f (patch)
tree6d6bb1740ca2568fb5451c250aa611ee97d5eedc
parent34b49d554591bb788ef7e19afea385daba66ffc8 (diff)
downloadorg.eclipse.cdt-1abc90f0b876c18976842063b1746c071859836f.tar.gz
org.eclipse.cdt-1abc90f0b876c18976842063b1746c071859836f.tar.xz
org.eclipse.cdt-1abc90f0b876c18976842063b1746c071859836f.zip
Added a message to ArrayStoreException.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
index 5b21be4b3a..2b9af86d06 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
@@ -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;
}

Back to the top