Ouch... Did you see yourself doing it one second before it happened ?
When swapping pedals around a while back I was pulling the pedal wrench toward the big ring. I thought to myself, "If this slips I'm going to hit the ........BAM! " Thumb meets big ring at a rapid rate.
Sprocket tooth jammed straight into the joint...and deep. Hurt like a mutha and bled like a stuck pig.
Learn from this... when swapping pedals, move chain onto the big ring. I already knew this but forgot until one second prior to impact.