Update exception handling for DatabaseConnection