aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/ui/UIInitException.java
blob: c57578824ad6abbb425fa255eb6dad7ee2d2bf66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.vaadin.tests.components.ui;

import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.Label;

public class UIInitException extends AbstractReindeerTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        setErrorHandler(
                event -> addComponent(new Label("An exception occurred: "
                        + event.getThrowable().getMessage())));
        throw new RuntimeException("Catch me if you can");
    }

    @Override
    protected String getTestDescription() {
        return "Throwing an exception in application code during a browser details request should show a sensible message in the client";
    }

    @Override
    protected Integer getTicketNumber() {
        return Integer.valueOf(8243);
    }

}