You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2008/03/06 14:00:58 UTC

[jira] Assigned: (MAHOUT-10) Replace fall-through exception handlers with propagated unchecked exception.

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

Dawid Weiss reassigned MAHOUT-10:
---------------------------------

    Assignee: Dawid Weiss

> 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
>         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.