classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Declaring RuntimeExceptions?


From: Ingo Prötel
Subject: Re: Declaring RuntimeExceptions?
Date: Thu, 11 Sep 2003 14:50:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Hi Sascha,

I think Classpath should also declare RuntimeExceptions if JDK does so.

If you do a getExceptionTypes() on java.lang.reflect.Method you will get
all declared Throwables. This includes RuntimeExceptions and Errors that
are declared to be thrown by a method (also for constructors).

So, to keep the runtime-behavoir of such objects consistent we need to
declare such Exceptions even if the compiler does require it.

--ingo

Sascha Brawer wrote:
Hi all,

if the signature of a JDK method declares to throw some RuntimeException,
should the Classpath do so, too?

For example, java.awt.Toolkit.createButton declares to throw
java.awt.HeadlessException in the JDK, but not in Classpath.
HeadlessException extends java.lang.RuntimeException.

-- Sascha

Sascha Brawer, address@hidden, http://www.dandelis.ch/people/brawer/




_______________________________________________
Classpath mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/classpath






reply via email to

[Prev in Thread] Current Thread [Next in Thread]