ensure a return when an abort happens in a function that returns something