Logical fallacy

Fallacy of accident

A generally reasonable rule is applied mechanically to an exceptional case where the rule’s purpose or ordinary qualifications make it inapplicable. The argument ignores a relevant distinction.

Also called Sweeping generalization, Dicto simpliciter

An ambulance held at a closed park gate in front of a no-vehicles sign

Examples

No vehicles are allowed in the park. Therefore an ambulance must stay outside even when someone needs urgent help.
The rule’s usual purpose does not explain applying it in an emergency at the expense of that purpose.
Phones are forbidden in class, so a student must never use one to summon help in an emergency.