这是处理数据库异常的一种更好的方法。
查阅数据库手册,搜索异常中返回的错误码,从而判断失败的原因。
Identify cause of the failure by going through database manuals and searching for the error codes sent back in the exception.
这是因为一些数据库被配置为会杀掉长时间空闲的连接,网络或数据库相关的异常也可能会杀死连接。
This is because some databases are configured to kill long idle connections and a network or database related exception may also kill a connection.
应用推荐