aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/client/ClientExceptionHandler.java
blob: 724bd24a69073896047d8b93401f69faebf47d3f (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.terminal.gwt.client;

public class ClientExceptionHandler {

    public static void displayError(Throwable e) {
        displayError(e.getMessage());
        e.printStackTrace();
    }

    public static void displayError(String msg) {

        Console console = ApplicationConnection.getConsole();

        if (console != null) {
            console.error(msg);
            // } else {
            // System.err.println(msg);
        }
    }

    public static void displayError(String msg, Throwable e) {
        displayError(msg);
        displayError(e);

    }

}