Don't hide errors in generate functions.

This fixes issue #3