|
|
|
|
|
by mynameisme
4668 days ago
|
|
You can't just assume that a valid database connection will remain valid the entire time you're using it. The network or server is free to go down at any time. In practice, this rarely happens, it's an exceptional condition. Exceptions are the best way to model these kind of errors. |
|
Point is: the function that deals with database response should never be responsible for dealing with database connection errors.