Bug 61996 - bad idea to subclass Error for ordinary exceptions
Summary: bad idea to subclass Error for ordinary exceptions
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-12 16:18 EDT by Jim des Rivieres CLA
Modified: 2004-05-28 04:46 EDT (History)
0 users

See Also:


Attachments
patch to o.e.jdt.ui to convert Errors to RuntimeExceptions (2.72 KB, patch)
2004-05-12 16:19 EDT, Jim des Rivieres CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jim des Rivieres CLA 2004-05-12 16:18:28 EDT
Build I20040512

It's generally a bad idea to subclass Error for ordinary exceptions. Better to 
subclass RuntimeException if you want an unchecked exception. There are a 
couple of places in jdt.ui where subclasses of Error are defined; it looks 
like should be RuntimeExceptions.
Comment 1 Jim des Rivieres CLA 2004-05-12 16:19:40 EDT
Created attachment 10568 [details]
patch to o.e.jdt.ui to convert Errors to RuntimeExceptions

Patch is totally untested.
Comment 2 Dirk Baeumer CLA 2004-05-13 05:36:42 EDT
Makes sense. Martin can you look at Organize Import and then hand the PR over 
to Andre to look at compare and the all types cache.
Comment 3 Martin Aeschlimann CLA 2004-05-13 10:01:53 EDT
fixed in OrganizeImportsAction
Comment 4 Andre Weinand CLA 2004-05-24 11:57:51 EDT
fixed in AllTypesCache
fixed in JavaStructureCreator
Comment 5 Tom Hofmann CLA 2004-05-28 04:21:32 EDT
verifying...
Comment 6 Tom Hofmann CLA 2004-05-28 04:46:45 EDT
verified in source.