refactor _popup_exceptions a bit