public Exception getException() {
    hasUnhandledException = false;
    return exception;
  }
Gets the last exception that was thrown and marks it as handled, i.e. after calling this method
hasUnhandledException() will return false.
integ-tests/src/cucumberTest/java/cucumber/steps/helpers/ExceptionContext.java