[ 
https://issues.apache.org/jira/browse/MAHOUT-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Wettin updated MAHOUT-10:
------------------------------

    Fix Version/s: 0.1

> Replace fall-through exception handlers with propagated unchecked exception.
> ----------------------------------------------------------------------------
>
>                 Key: MAHOUT-10
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-10
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Clustering
>    Affects Versions: 0.1
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: mah-10.patch
>
>
> I am doing a belated code review. There certain issues that I would like to 
> change, for example fall-through exception handlers like this one:
>     try {
>       Class cl = Class.forName(job.get(DISTANCE_MEASURE_KEY));
>       measure = (DistanceMeasure) cl.newInstance();
>       measure.configure(job);
>     } catch (Exception e) {
>       e.printStackTrace();
>     }
> This prints the stack trace of an exception to the console, but continues 
> thread's execution after the catch clause. Since distance measure key is 
> required, this makes little sense. A runtime exception should be thrown -- 
> this stops the job and causes a full stack trace to be displayed anyway (with 
> the nested exception's message).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to