Throw (or knock) someone for a loop: to confuse or shock someone, which usually makes the person very upset because he/she doesn’t expect it.
1). He threw me for a loop when he said he was quitting his job.
2). He totally threw me for a loop when he decided not to take my advice on the project we have been working on.