Why don't you use a goto then? The goto statement exists for a reason and there is even an "out" label... And it's not dangerous, at least [most of the time](https://xkcd.com/292/).