Skip to content

Commit

Permalink
fixed error messages too cryptic, exception cause not printed out
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Jan 19, 2018
1 parent 1782801 commit 494dff2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/erudika/para/persistence/SqlUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() + ")]";
}
}

0 comments on commit 494dff2

Please sign in to comment.