The passage is an example of situational irony. Situational irony is a type of irony (and a type of figurative language). Meaning a contrast between what is expected and what happens. The question´s situation ends up in a different way than what is generally anticipated. In situational irony, both the characters and the audience are fully unaware of the implications of the real situation.