Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361070

Summary: RedeclaredFieldNameException should tell which type caused the problem (Patch)
Product: z_Archived Reporter: Anya Helene Bagge <eclipzilla>
Component: IMPAssignee: Jurgen Vinju <jurgen.vinju>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rfuhrer
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch to fix the problem none

Description Anya Helene Bagge CLA 2011-10-15 16:55:42 EDT
The RedeclaredFieldNameException, used to report errors from TypeStore, doesn't report any info about the relevant type, making it hard to track down the error.

The attached patch adds the name of the type to the exception message (and to the exception object), so you get something like:

"The field name baz is illegally used for both int and str in type Foo"

(+ fix a speling error in the error message)
Comment 1 Anya Helene Bagge CLA 2011-10-15 16:56:13 EDT
Created attachment 205270 [details]
Patch to fix the problem
Comment 2 Jurgen Vinju CLA 2011-10-26 17:14:23 EDT
Applied the patch. Thanks Anya!