[5-to-6] clean up exceptions a bit