<commit_before>package db;

import java.sql.*;

import javax.swing.JOptionPane;

public class Conexion {
	
	private static String user = "root";
	private static String pass = "";

    public static ResultSet ejecutarSQL(String sql){
	try {
		Connection con;
		Class.forName("com.mysql.jdbc.Driver");
		con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dsi01",user,pass);
	    Statement stmt = con.createStatement();
	    stmt.execute(sql);
	    con.close();
	    return stmt.getResultSet();
	} catch (Exception e) {
		JOptionPane.showMessageDialog(null,
		        "Error al conectar con la base de datos! '",
		        "Error Base de Datos",
		        JOptionPane.ERROR_MESSAGE);
		System.exit(0);
	}
	    return null;
    }
    
    public static boolean PruebaConexion(){
    	try {
    		Connection con;
    		Class.forName("com.mysql.jdbc.Driver");
    		con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dsi01",user,pass);
    	    con.close();
    	    return true;
    	} catch (Exception e) {
    		JOptionPane.showMessageDialog(null,
    		        "Error al conectar con la base de datos! '",
    		        "Error Base de Datos",
    		        JOptionPane.ERROR_MESSAGE);
    		System.exit(0);
    	}
    	return false;
    }
    
}<commit_msg>Agregado msjes de error correspondientes en Conexion.class<commit_after>package db;

import java.sql.*;

import javax.swing.JOptionPane;

import gui.MensajesError;

public class Conexion {
	
	private static String user = "root";
	private static String pass = "";

    public static ResultSet ejecutarSQL(String sql){
	try {
		Connection con;
		Class.forName("com.mysql.jdbc.Driver");
		con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dsi01",user,pass);
	    Statement stmt = con.createStatement();
	    stmt.execute(sql);
	    con.close();
	    return stmt.getResultSet();
	} catch (Exception e) {
		MensajesError.meEr_FallaConexion();
		System.exit(0);
	}
	    return null;
    }
    
    public static boolean PruebaConexion(){
    	try {
    		Connection con;
    		Class.forName("com.mysql.jdbc.Driver");
    		con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dsi01",user,pass);
    	    con.close();
    	    return true;
    	} catch (Exception e) {
    		MensajesError.meEr_FallaConexion();
    		System.exit(0);
    	}
    	return false;
    }
    
}
{'fraction_non_alphanumeric': 0.12045646661031277, 'fraction_numerical': 0.011834319526627219, 'mean_word_length': 2.8676470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4412051', 'n_tokens_mistral': 841, 'n_tokens_neox': 788, 'n_words': 160}