code: final void closeAndRemoveDatabaseHandle(Database databaseHandle) {
          try {
              databaseHandle.close();
          } catch (EnvironmentFailureException | IllegalStateException ex) {
              try {
                  LOGGER.log(Level.SEVERE,
                          "Error closing database {0}", databaseHandle.getDatabaseName());
              } catch (EnvironmentFailureException | IllegalStateException ex2) {
                  ex.addSuppressed(ex2);
              }
              throw ex;
          } finally {
              this.databaseHandles.remove(databaseHandle);
          }
      }
docs: Closes a database that was previously created by this factory instance.
  
  @param databaseHandle the database to close.
  
  @throws EnvironmentFailureException if an unexpected, internal or
  environment-wide failure occurs.
  @throws IllegalStateException if the database has been closed.