Hello.

> [...]

Of course, I didn't overlook that you just ask for a
  @throws FunctionEvaluationException when the evaluation failed.
Javadoc comment.

I'm just reluctant to publicize a guideline that is not adhered to in CM!
Whenever a method is passed an argument that doesn't fulfill pre-conditions,
it throws an "IllegalArgumentException". But "FunctionEvaluationException"
is not a subclass of "IllegalArgumentException". Users who are passed a
"UnivariateRealFunction" instance should not rely that catching
"FunctionEvaluationException" will work in most cases!

So, should the Javadoc in fact be
  @throws IllegalArgumentException when the evaluation failed because
  of an invalid argument.
  @throws FunctionEvaluationException when the evaluation failed for any
  other reason.
?

Then, how do you extend your guidelines to make it clear when to use one or
the other?
You could write a document that would explain how good it would be if all
programs were using the same exceptions. But I must point out that CM isn't
a good example, with its policy of no dependencies. Why would anyone depend
on CM just for the sake of using CM exceptions?


Best regards,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to