throw with String

Rémi Forax forax at univ-mlv.fr
Wed Sep 15 15:08:49 PDT 2010


Le 15/09/2010 21:50, Ralf Ebert a écrit :
>> Beside the organizational details, throwing RuntimeException all over
>> the place is not very useful. You would have to support better pattern
>> matching to make it bearable. Setting up an exception type hierarchy
>> will pay off. Maybe scripting is the only exception but this is
>> something Java is not the best choice for.
>>      
> For errors that are supposed to be handled in code, exception
> hierarchies and 'throw new MyException()' statements are perfectly fine
> of course. But a fair share of exceptions thrown in Java software are
> exceptions that can never be specifically handled. This includes
> assertions and situations that can only occur because of programming
> errors. For these, exception hierarchies are often declared without
> need, because 'throw new RuntimeException' in considered somewhat in bad
> style by some programmers (without much reason in my humble opinion).
>    

Do you mean that it's not useful to make a difference between
a NPE and an AIOOB ?

> Sorry for not noticing the 'project coin ended' message, I'll file a bug
> report about the proposal.
>
> - Ralf
>    

Rémi



More information about the coin-dev mailing list