From 494dff275de7e0ac318551515fb58ef043d1962c Mon Sep 17 00:00:00 2001 From: Alex Bogdanovski Date: Sat, 20 Jan 2018 01:28:05 +0200 Subject: [PATCH] fixed error messages too cryptic, exception cause not printed out --- src/main/java/com/erudika/para/persistence/SqlUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/erudika/para/persistence/SqlUtils.java b/src/main/java/com/erudika/para/persistence/SqlUtils.java index 29a0cf9..4b05281 100755 --- a/src/main/java/com/erudika/para/persistence/SqlUtils.java +++ b/src/main/java/com/erudika/para/persistence/SqlUtils.java @@ -447,6 +447,7 @@ private static String logSqlError(Exception e) { return ""; } SQLException sqlException = (SQLException) e; - return " (Error Code: " + sqlException.getErrorCode() + ", SQLState: " + sqlException.getSQLState() + ")"; + return " [" + e.getMessage() + " (Error Code: " + sqlException.getErrorCode() + + ", SQLState: " + sqlException.getSQLState() + ")]"; } }