HikariCP icon indicating copy to clipboard operation
HikariCP copied to clipboard

Improve message about failed setLoginTimeout by showing exception type

Open turbanoff opened this issue 5 years ago • 1 comments

Current message about failing setLoginTimeout can be confusing. For example when using Spring AbstractDataSource - message in logs will looks like this:

Failed to set login timeout for data source. (setLoginTimeout)

From this message it's very hard to understand what was cause of failing method. I propose to replace e.getMessage() with e.toString() because toString will print exception class name too. And log will look like this:

Failed to set login timeout for data source. (java.lang.UnsupportedOperationException: setLoginTimeout)

turbanoff avatar Mar 26 '19 22:03 turbanoff