Please sign in to comment.
Add Sequel::DatabaseConnectionError, for indicating that Sequel wasn'…
…t able to connect to the database This error is only raised by the connection pool if there is an error calling the connection proc (or the connection proc returns nil). Generally, it indicates that your database connection parameters are wrong (bad host, bad username, bad password, etc.). This commit also fixes a bug that would cause the created_count of the connection pool to increase when there was an error raised during the connection. In practice, this didn't matter much as the connection pool would be unlikely to have valid connections (at least for the same server). The reason it catches nil as well is that is also what is returned by make_new if it is not able to get a valid connection. Before, Adapters that returned nil instead of raising an error on a call to connect would cause a busy wait in the connection pool.
- Loading branch information...
Showing with 30 additions and 2 deletions.