fix actions
Some checks failed
Gradle CI with Jacoco / build (push) Failing after 16m8s

This commit is contained in:
Jan-Philipp Luithardt
2025-12-07 12:55:46 +01:00
parent 702c4c8525
commit 954a28f678
2 changed files with 4 additions and 4 deletions

View File

@@ -2,8 +2,8 @@ package hhn.temp.project.expections;
public class SQLNoConectionException extends RuntimeException { public class SQLNoConectionException extends RuntimeException {
public SQLNoConectionException(String message) { public SQLNoConectionException(String message, Exception e) {
super(message); super(message + " ("+ e.getMessage()+")");
} }
} }

View File

@@ -32,9 +32,9 @@ public class MySql {
Class.forName("com.mysql.cj.jdbc.Driver"); Class.forName("com.mysql.cj.jdbc.Driver");
connection = DriverManager.getConnection(url, user, password); connection = DriverManager.getConnection(url, user, password);
} catch (SQLException e) { } catch (SQLException e) {
throw new SQLNoConectionException("Cant connect to the database"); throw new SQLNoConectionException("Cant connect to the database", e);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
throw new SQLNoConectionException("Cant connect to the database: Driver class not found!"); throw new SQLNoConectionException("Cant connect to the database: Driver class not found!", e);
} }
} }