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

Benjamin Francisoud updated PIG-80:
-----------------------------------

    Attachment: PIG-80-v04.patch

This patch does the same PIG-80-v02.patch using initCause() method but on all 
cases with the same pattern: an exception transformed into an IOException where 
the stacktrace is lost.

There are still e.printStracktrace() in the code but that's a different issue 
see PIG-84.

To avoid duplicating this ugly code everywhere and keep it DRY, I create a 
class: org/apache/pig/impl/util/WrappedIOException.java
The client code look like this:
{code:java}throw WrappedIOException.wrap(e);{code}

I also created a unit test: WrappedIOExceptionTest.java
You will need to create folder: test/org/apache/pig/impl/util to apply this 
patch

> Stacktrace information is lost at MapReduceLauncher.java:289
> ------------------------------------------------------------
>
>                 Key: PIG-80
>                 URL: https://issues.apache.org/jira/browse/PIG-80
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.1.0
>            Reporter: Benjamin Francisoud
>            Priority: Minor
>         Attachments: PIG-80-v01.patch, PIG-80-v02.patch, PIG-80-v03.patch, 
> PIG-80-v04.patch
>
>
> {code:java}
> ...
> }catch (Exception e) {
>     // Do we need different handling for different exceptions
>     e.printStackTrace();
>     throw new IOException(e.getMessage());
> }finally{ ...
> {code}
> in my case the sandard output is redirtected to /dev/null so 
> "e.printStackTrace();" is lost.
> it should be :
> {code:java}throw new IOException(e);{code} 
> no getMessage() because we loose the rest of the stacktrace

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