Checked Exceptions do not exist on the JVM.

Ruslan Shevchenko rssh at
Wed May 20 08:53:50 PDT 2009

> Tom Ball wrote:
>> I don't consider "Ruslan, you've got it all wrong" an example of opening
>> a
>> "perfectly civil email", it sounds like bullying.  This isn't slashdot,
>> it's
>> a forum for discussions on possible small improvements to the Java
>> language.  So I shouldn't have responded with the same tone as your
>> message,
>> and for that I apologize to the wider group.

 But I really 'got it all wrong' (fooling by ignore keyword and luck of
time to read)
 I think until we able speak 'in essence' about technical side of things,
level of expression is ok ;)

>> The purpose of throws clauses is to better describe the contract a
>> method
>> offers for its callers:  it only accepts parameters of a certain type,
>> it
>> returns an instance of a specific type, and under certain (hopefully
>> documented) conditions it may throw specific exceptions.  Checked
>> exceptions
>> are intended to call out specific exceptions that the library writer
>> believes the caller should be able to recover from, and therefore should
>> handle or forward.  If a library writer subverts the contract of his own
>> method, well, that's a shame but doesn't necessarily call for changes to
>> the
>> language.  If a non-Java language has libraries which throw what are in
>> Java
>> checked exceptions, then write Java code which does more checking at
>> runtime
>> since that's apparently what the other language requires (or don't use
>> those
>> libraries).
>> This isn't a problem, and so there is nothing about it that needs fixing
>> in
>> Java 7.


 Except case of Class.newInstance(), which must be or deprecated, or
marked as thrown Throwable.

More information about the coin-dev mailing list