Bug 12800 - suboptimal error messages on mistyped 'throw/throws' keywords
Summary: suboptimal error messages on mistyped 'throw/throws' keywords
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-04 10:54 EST by Adam Kiezun CLA
Modified: 2003-08-28 04:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-04-04 10:54:08 EST
class E{
	void d(){
		throws //syntax error
	}
}

the error message says that 'class' or 'interface' is expected
there can be more than just these 2 keywords, that's one thing (any 
type/method/field name for instance)

but what i really would like is "'throw' expected" - then, QuickFix could fix 
that typo for me

same works the other way round too:
void d() throw{
}
the error says "'{' exoected"
but 'throws' is fine too. it should be suggested to make fixing easier
Comment 1 Philipe Mulet CLA 2002-04-05 05:55:07 EST
Improving parser error messages is not on the 2.0 plan, we should definitely 
revisit this later on.
Comment 2 Philipe Mulet CLA 2003-06-10 09:28:31 EDT
Reconsidering given new syntax error diagnosis heuristic
Comment 3 David Audel CLA 2003-07-15 08:54:52 EDT
Fixed.
Comment 4 David Audel CLA 2003-08-28 04:42:02 EDT
Verified.