commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Barnhill <>
Subject Re: [complex][math-util] dependencies
Date Tue, 13 Dec 2016 13:57:04 GMT
On Tue, Nov 29, 2016 at 8:48 PM, Gilles <>

> In "Commons RNG", I completely dropped all custom-made exceptions.
> I suggest you do the same here.
> IMO, "simple", low-level, components can do with just throwing
> runtime exceptions from the standard library (with a hard-coded
> _English_ message).

So, let's say three different methods in Quaternion throw a ZeroException
right now.

Are you happy with a coding practice of each method calling

throw new RuntimeException("Zero Exception");

or would it be preferable to write an additional method at the bottom,

private static void zeroException() {
    throw new RuntimeException("Zero Exception");

and call it three times?

And if I do that, I should just tally up the different exceptions in the
complex methods and have one more class, ComplexRuntimeExceptions.

Barring any further objections, this is what I'll do.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message