> -----Original Message-----
> From: Andrus Adamchik [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 03, 2007 12:38 PM
> To: [email protected]
> Subject: Re: Exceptions . . .

> For things like argument checking in the user-facing API,
> IllegalArgumentException seems more appropriate than
> CayenneRuntimeException.

Agreed.

> Also I don't think we have too many methods in Cayenne (if any at
> all) that throw checked CayenneException, requiring a try/catch. It
> is always CayenneRuntimeException.

Yeap.  My mistake.

> It's been the later. But also because everybody wants to cut down
> time writing unit tests, not because of some principle :-)

Then I suppose this would raise another topic.  JUnit 3 is a bit of a
boar for testing exception.  You basically have to try, catch, fail.
TestNG has a standard facility for testing for expected exceptions.  My
guess is that JUnit4 does as well, but I have nothing to back that up
with.  There was some discussion some time ago about moving the testing
framework.  Have we hit that crossroad yet, or is that still for a rainy
day?

-- 
Kevin

Reply via email to