dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.36k stars 191 forks source link

Improve exception handling in jsonrpcclient #350

Open ellbosch opened 4 years ago

ellbosch commented 4 years ago

The jsonrpcclient.py file has two instances of generic exception handling. Generic exception handling breaks PEP 8 and can make debugging issues more difficult, especially since exceptions are suppressed.

Although we are logging exceptions, I recommend re-working this logic. If we choose to keep generic exception handling then we may at least consider simplifying instances of redundant code where repeat logic is used across different exceptions.