On Jan 5, 2007, at 9:35 AM, Dain Sundstrom wrote:

On Jan 5, 2007, at 9:23 AM, Alan D. Cabrera wrote:

We throw a number of vanilla RuntimeExceptions. Should we not build a few OpenEJB exceptions on top of these?

I agree that vanilla RuntimeExceptions are bad, but I think we should be careful when replacing these. In general, I think we should favor the standard Java exception classes like NullPointer, IllegalArgument, and IllegalState. I hope we can avoid the coupling that happened in Geronimo when we had lots of "common" exceptions in the geronimo-common module.

Agreed. Useful and informative runtime exceptions should be left as is. But, I also think that we should wrap exceptions that would make no sense to the bean developer. For example, when calling a session context getBusinessObject, that method could theoretically throw an IllegalAccessException when it returns a proxy to the business object. I think that it should be wrapped with another runtime exception such as InternalErrorException.


Regards,
Alan



Reply via email to