Use dialog instead of an exception