handle wpdb error ourselves, instead of waiting for dead_db()