code: protected void closeDatabase(Database database) {
          try {
              if(database != null) {
                  database.close();
              }
          } catch (DatabaseException e) {
              log("Error closing the database connection.", e, Project.MSG_WARN);
          }
      }
docs: Convenience method to safely close the database connection.
  
  @param database The database to close.