What is the effect of the following sentence?

The teacher caught the student chewing gum.
The student spit out the gum.