The prusa mk3 from prusa research has a sensor for this, what it does when it detects a jam is up to what you do in firmware and I can't remember what they chose to do.