Luffy's handling of Sanji's "betrayal" on Whole Cake is really messed up when you think about it.
By refusing to leave the area he was essentially condemning himself, Nami, Chopper, Brook, Pedro & Carrot to death.
"Sanji! Come back here or I will kill myself and get my whole crew killed too!" is essentially what Luffy was saying.
Lucky that Jimbe just so happened to be around.