LPS-50619 don't use exceptions for control flow