Add error handling for database failure.
Merge pull request #892 from arjclark/suite_shutdown_on_loacked_db

Add error handling for database failure.