I think the point, which is a valid one, was that some base implementation
of a method may declare to throw some exception, not because it throws it,
but because it is legal for it's subclasses to throw it if they wish.
Unfortunately, there's no way around this if you want to provide a base
implementation for a method but still allow subclasses to throw something
else.

I think the feature would still be helpful, even if it was only on static,
final or private methods - just need to get into the habit of making them
final!

>From: "Michael Descher" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: AW: [Eap-features] Underline extraneous exception work.
>Date: Thu, 7 Mar 2002 08:58:49 +0100
>charset="iso-8859-1"
>Reply-To: [EMAIL PROTECTED]
>
>Overriding methods cannot throw more general or completely different
>exceptions than the overridden method. So if a method does not declare to
>throw exception A, no overriding method can throw exception A.
>
>Michael
>
>> -----Urspr�ngliche Nachricht-----
>> Von: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]]Im Auftrag von Michael D. Norman
>> Gesendet: Donnerstag, 7. M�rz 2002 07:52
>> An: [EMAIL PROTECTED]
>> Betreff: Re: [Eap-features] Underline extraneous exception work.
>>
>>
>> A given method may not throw an exception, but subclasses may
>> override that
>> method and may need to throw an exception.  That would seem to only make
>> sense for static, final, or private methods.
>>
>> -- Michael
>> ----- Original Message -----
>> From: "Graham Lea" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Wednesday, March 06, 2002 10:50 PM
>> Subject: [Eap-features] Underline extraneous exception work.
>>
>>
>> > Would it be too much effort to extend the error highlighting to
>> underline
>> > catch clauses for exceptions that are "not thrown in the
>> corresponding try
>> > block"?
>> >
>> > What about highlighting exceptions in the throws clause of a method
>> > declaration if the exception is never thrown by that method (or
>> any of the
>> > methods it calls)?
>> >
>> > Graham Lea

Graham Lea

--
Software Engineer
Forge Research Pty Ltd
Suite 116, Bay 9, Locomotive Workshop
Australian Technology Park, Cornwallis Street
Eveleigh NSW 1430 Australia
Phone: +61 2 9209 4152   Fax: +61 2 9209 4172
www.forge.com.au

----------------------------------------------------------------------
This message contains privileged and confidential information intended
only for the use of the addressee named above.  If you are not the
intended recipient of this message you must not disseminate, copy or
take any action in reliance on it.  If you have received this message
in error please notify the sender immediately.  Any views expressed in
this message are those of the individual sender, except where the
sender specifically states them to be the views of another (including
a Body Corporate).
----------------------------------------------------------------------


_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features

Reply via email to