If emitting the error causes an exception, if skip_types is defined AND
it matches, continue on as normal (as if there was no exception in the
first place).