I'm automating a web application using Selenium-web driver. Once the script breaks at any point I want to stop execution of the code instead of continuing with the next method so that I can know where the automation is breaking. Could anyone please help me how can I do that.

Here is the snippet of the catch block(i.e. the exception I'm using now) 

```
try {
   //code
} 
catch(Exception e){
   System.out.println("Exception occurred *** " +e.getMessage());
}

```