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

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

Igor Kryvenko created HIVE-19263:
------------------------------------

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


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)