replace more throw clauses with asserts

performance+