Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
getSession().error(message);
throw new RestartResponseException(MyErrorPage.class, optionalPageParameters);
// use RestartResponseAtInterceptPageException(MyErrorPage.class);
// instead to interrupt current request processing and immediately redirect to an intercept page

// it may be tempting to do the following, but it should not be done:
// error(message);
// setResponsePage(MyErrorPage.class);

...