Bug 61998 - bad idea to subclass Error for ordinary exceptions
Summary: bad idea to subclass Error for ordinary exceptions
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-12 16:22 EDT by Jim des Rivieres CLA
Modified: 2004-06-11 05:23 EDT (History)
0 users

See Also:


Attachments
patch to o.e.compare to convert Error to RuntimeException (728 bytes, patch)
2004-05-12 16:23 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:22:52 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. 
org.eclipse.compare.internal.ViewerSwitchingCancelled is a subclass of Error; 
it looks to me like it should be a RuntimeException.
Comment 1 Jim des Rivieres CLA 2004-05-12 16:23:43 EDT
Created attachment 10569 [details]
patch to o.e.compare to convert Error to RuntimeException

Patch is totally untested.
Comment 2 Andre Weinand CLA 2004-06-02 18:51:48 EDT
fixed for RC2
Comment 3 Martin Aeschlimann CLA 2004-06-11 05:23:39 EDT
verified that fix is in I20040611 (verified in code)