public void validateDatabaseExists(String databaseName) throws SemanticException {
    boolean exists;
    try {
      exists = databaseExists(databaseName);
    } catch (HiveException e) {
      throw new SemanticException(ErrorMsg.DATABASE_NOT_EXISTS.getMsg(databaseName), e);
    }

    if (!exists) {
      throw new SemanticException(ErrorMsg.DATABASE_NOT_EXISTS.getMsg(databaseName));
    }
  }
@param privileges
         a bag of privileges
@return true on success
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java