title: How to make TestNG continue test execution on an exception?
body: <p>When i get an exception, the test run immediately ends, and any following test validations are skipped. I would like to catch the exception, handle it, then continue the workflow.  </p>
  
  <p>In the below example, If <code>objPage.Method1();</code> throws an exception, the entire <code>@Test</code> immediately ends. I would like the <code>catch</code> to execute, then move on to <code>objPage.Method2()</code>.</p>
  
  <pre><code>@Test (enabled=true)
  public void MyClientsFunctions() throws Exception {
      ExtentTest t = ReportFactory.getTest();
      try {
  
          Login objPage = new PageObject(driver);
  
          //this method throws exception
          objPage.Method1();
            if (x=y)
              t.log(LogStatus.PASS, "Pass message");
            else
              t.log(LogStatus.FAIL,"Fail message"+ screenshotMethod());
  
          objPage.Method2();
            if (a=b)
              t.log(LogStatus.PASS, "Pass message");
            else
              t.log(LogStatus.FAIL,"Fail message"+ screenshotMethod());
  
       } catch (Exception e) {
          t.log(LogStatus.ERROR, "Exception found: " + e.getMessage() + screenshotMethod());
      }
  }
  </code></pre>
  
  <p>I am using PageFactory and ExtentReports. I am use <code>if</code> statements to report failures. No asserts. I believe if an assert fails, the result is the same, and the test ends.</p>