[
https://issues.apache.org/jira/browse/MAHOUT-1317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13799200#comment-13799200
]
Ted Dunning commented on MAHOUT-1317:
-------------------------------------
Keep in mind that Preconditions.checkArgument accepts format sorts of
arguments. That can make it much easier to give good messages.
> Clarify some of the messages in Preconditions.checkArgument
> -----------------------------------------------------------
>
> Key: MAHOUT-1317
> URL: https://issues.apache.org/jira/browse/MAHOUT-1317
> Project: Mahout
> Issue Type: Improvement
> Affects Versions: 0.9
> Reporter: BFL
> Assignee: Sebastian Schelter
> Priority: Minor
> Fix For: 0.9
>
>
> In experimenting with things, I was getting some errors from
> RowSimilarityJob, that in looking at the source I realized were a little
> incomplete as to what the true issue was. In this case, they were of the
> form:
> Preconditions.checkArgument(maxSimilaritiesPerRow > 0, "Incorrect maximum
> number of similarities per row!");
> Here, it is known that the actual issue is that the parameter must be zero
> (or negative), not just that it's "incorrect", and a (trivial) change to the
> error message might save some folks some time... especially newbies like
> myself.
> A quick grep of the code showed a few more cases like that across the code
> base that would be (apparently) easy to fix and maybe save folks time when
> they get the relevant error.
--
This message was sent by Atlassian JIRA
(v6.1#6144)