How to stop the bot after throw

My doubt How it will goes to end process after throwing exception