Bug 61996

Summary: bad idea to subclass Error for ordinary exceptions
Product: [Eclipse Project] JDT Reporter: Jim des Rivieres <jeem>
Component: UIAssignee: Andre Weinand <andre_weinand>
Status: VERIFIED FIXED QA Contact:
Severity: trivial    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 RC1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch to o.e.jdt.ui to convert Errors to RuntimeExceptions none

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.