Ah, or maybe `err` could call to switch state, and just catch any errors in it to prevent endless recursion?