denisenkom / pytds

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation
MIT License
192 stars 53 forks source link

during network failure a socket.timeout: timed out occurs instead of a pytds.OperationalError exception #104

Open ikzelf opened 5 years ago

ikzelf commented 5 years ago

it would be far more convenient to always return a pytds exception. In other drivers for the same kinds of errors an OperationalError is returned, making it far simpler to catch errors. After all, for some reason the communication with the database fails. That is is caused by a socket timeout can be added to the exception text.