[
https://issues.apache.org/jira/browse/PHOENIX-3291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15504241#comment-15504241
]
Samarth Jain commented on PHOENIX-3291:
---------------------------------------
[~jamestaylor], +1 with one minor comment:
In PhoenixStatement, instead of
{code}
catch (Exception e) {
Throwables.propagateIfInstanceOf(e, SQLException.class);
Throwables.propagate(e);
throw new IllegalStateException(); // Can't happen as
Throwables.propagate() always throws
}
{code}
this is simpler, no?
{code}
catch (SQLException e) {
throw e;
}
{code}
> Do not throw return value of Throwables#propagate call
> ------------------------------------------------------
>
> Key: PHOENIX-3291
> URL: https://issues.apache.org/jira/browse/PHOENIX-3291
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Assignee: James Taylor
> Fix For: 4.9.0, 4.8.1
>
> Attachments: PHOENIX-3291.patch
>
>
> Several places in the code are doing the following which is wrong:
> {code}
> throw Throwables.propagate(e);
> {code}
> This seems to get rid of any stack trace. Instead, it should be:
> {code}
> Throwables.propagate(e);
> throw new IllegalStateException(); // won't happen as above call throws
> {code}
> This preserves the stack trace.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)