code: public static void withInstance(Map<String, Object> args, Closure c) throws SQLException, ClassNotFoundException {
          Sql sql = null;
          try {
              sql = newInstance(args);
              c.call(sql);
          } finally {
              if (sql != null) sql.close();
          }
      }
docs: Invokes a closure passing it a new Sql instance created from the given map of arguments.
  The created connection will be closed if required.
  
  @param args a Map contain further arguments
  @param c the Closure to call
  @see #newInstance(java.util.Map)
  @throws SQLException if a database access error occurs
  @throws ClassNotFoundException if the driver class cannot be found or loaded