code: public static void setExceptionSettingsForDeployment(final Application application,
  		final AbstractRequestCycleListener applicationRequestCycleListener)
  	{
  		// show the exception page from us...
  		application.getExceptionSettings()
  			.setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
  		// In case of unhandled exception redirect it to a custom page
  		application.getRequestCycleListeners().add(applicationRequestCycleListener);
  	}
docs: Sets the deployment exception settings for the given application.
  
  @param application
  the application
  @param applicationRequestCycleListener
  the application request cycle listener