public static MetaException newMetaException(String errorMessage, Exception e) {
    MetaException metaException = new MetaException(errorMessage);
    if (e != null) {
      metaException.initCause(e);
    }
    return metaException;
  }
convert Exception to MetaException, which sets the cause to such exception
@param errorMessage  the error message for this MetaException
@param e             cause of the exception
@return  the MetaException with the specified exception as the cause
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java