Added try catch to the database connection code.