Addresses enhancement issue #25100
create function run and exit using a Inline Method refactoring. Changed all uses from exit to the new function
Comment From: snicoll
@raqueru thanks for the PR but the related issue is flagged "on-hold" as we still need to figure out how we'd like this to be fixed.