Updates code to generate throws field