[ 
https://issues.apache.org/jira/browse/HIVE-19263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16446951#comment-16446951
 ] 

Vihang Karajgaonkar commented on HIVE-19263:
--------------------------------------------

Thanks for the patch [~ikryvenko] LGTM +1 (pending tests)

> Improve ugly exception handling in HiveMetaStore
> ------------------------------------------------
>
>                 Key: HIVE-19263
>                 URL: https://issues.apache.org/jira/browse/HIVE-19263
>             Project: Hive
>          Issue Type: Improvement
>          Components: Standalone Metastore
>            Reporter: Igor Kryvenko
>            Assignee: Igor Kryvenko
>            Priority: Minor
>         Attachments: HIVE-19263.01.patch
>
>
> In {{HiveMetaStore}} class we have a lot of  ugly exception handling code 
> using which use {{instanceof}}
> {code:java}
>  catch (Exception e) {
>         ex = e;
>         if (e instanceof MetaException) {
>           throw (MetaException) e;
>         } else if (e instanceof InvalidObjectException) {
>           throw (InvalidObjectException) e;
>         } else if (e instanceof AlreadyExistsException) {
>           throw (AlreadyExistsException) e;
>         } else {
>           throw newMetaException(e);
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to