private Database ensureGetDatabase(String catName, String dbName) throws UnknownDBException {
    try {
      return getDatabase(catName, dbName);
    } catch (NoSuchObjectException nsoe) {
      throw new UnknownDBException("Could not find database " + DatabaseName.getQualified(catName, dbName));
    }
  }
Gets the table object for a given table, throws if anything goes wrong.
@param dbName Database name.
@param tblName Table name.
@return Table object.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java