[
https://issues.apache.org/jira/browse/PHOENIX-7603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Istvan Toth resolved PHOENIX-7603.
----------------------------------
Resolution: Not A Bug
MetaException is a weird Thrift generated class that cannot take a cause :(
> Don't swallow exception causes in Connectors
> --------------------------------------------
>
> Key: PHOENIX-7603
> URL: https://issues.apache.org/jira/browse/PHOENIX-7603
> Project: Phoenix
> Issue Type: Improvement
> Components: connectors, hive-connector, spark-connector
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
> Labels: beginner, beginner-friendly
>
> Audit the code for instances where we catch an exception, then throw an other
> one without setting the original exception as cause, and fix them.
> Swallowing the cause is an anti-pattern that makes debugging more painful
> than it should be.
> i.e code like this:
> {code:java}
> } catch (SQLException e) {
> LOG.warn("error while creating table", e);
> throw new MetaException(e.getMessage());
> }
> {code}
> Should be fixed like this:
> {code:java}
> } catch (SQLException e) {
> LOG.warn("error while creating table", e);
> throw new MetaException("error while creating table", e);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)