You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UIInitException.java 831B

123456789101112131415161718192021222324252627
  1. package com.vaadin.tests.components.ui;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.tests.components.AbstractReindeerTestUI;
  4. import com.vaadin.ui.Label;
  5. public class UIInitException extends AbstractReindeerTestUI {
  6. @Override
  7. protected void setup(VaadinRequest request) {
  8. setErrorHandler(
  9. event -> addComponent(new Label("An exception occurred: "
  10. + event.getThrowable().getMessage())));
  11. throw new RuntimeException("Catch me if you can");
  12. }
  13. @Override
  14. protected String getTestDescription() {
  15. return "Throwing an exception in application code during a browser details request should show a sensible message in the client";
  16. }
  17. @Override
  18. protected Integer getTicketNumber() {
  19. return Integer.valueOf(8243);
  20. }
  21. }