make sure errors that get thrown instantly are caught