Exceptions with patterns in variable definitions