'How to Exit Azure databricks Notebook while Job is running

I am executing azure databricks notebook and Keeping try catch for exception handling in that I want to exit notebook run when Exceptions meet true. I'm keeping notebook exit command but it is moving to next cell.

Below is my code and output when I executed notebook. Can you please check and help If I'm doing wrong in any place.

enter image description here

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source