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
> >
> > --
> > 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
> >
>
>
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-features
>


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

Reply via email to