Thx Dick I will take a look and revise suitably or explain
On 8/3/10 5:16 PM, "Dick King (JIRA)" <email@example.com> wrote:
[ https://issues.apache.org/jira/browse/MAPREDUCE-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895096#action_12895096 ]
Dick King commented on MAPREDUCE-1921:
When creating a new exception to re-throw, perhaps we should duplicate the original exception's type? I realize that there's a lot of code that doesn't do that, but swallowing this information feels wrong. Especially in the case of IO exceptions, I can envision a lot of code that wants to treat certain sub-exceptions a bit differently; some IO exceptions are the caller's fault but some represent oddities that happened in the file system.
Perhaps something like
throw (IOException)(ioe.getClass().getConstructor(String.class, ioe.getClass())
.newInstance("IO error ..." + ... , ioe));
This cliche should occur in two places; perhaps we should pull it out and put it in one of the utilities classes? Perhaps IO utilities, since the main use case where I can see people caring is the large variety of IOException s.
This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.