[ALL TARGETS] error replaced by assert for preconditions