You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Igor Kryvenko (JIRA)" <ji...@apache.org> on 2018/04/21 17:11:00 UTC

[jira] [Updated] (HIVE-19263) Improve ugly exception handling in HiveMetaStore

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

Igor Kryvenko updated HIVE-19263:
---------------------------------
    Attachment: HIVE-19263.01.patch

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