client/src/main/java/org/apache/hupa/client/Hupa.java [31:71]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class Hupa implements EntryPoint {

    @Override
    public void onModuleLoad() {
        handleExceptionsAsync();
        initApp();
    }

    protected void initApp() {
        DOM.getElementById("loading").removeFromParent();
        createInjector().getHupaController();
        bindEvents();
    }

    protected void bindEvents() {
    }

    protected AppInjector createInjector() {
        return GWT.create(AppGinjector.class);
    }

    protected void handleExceptionsAsync() {
        GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
            public void onUncaughtException(Throwable e) {
                e.printStackTrace();
                GQuery.console.log(stackTraceToString(e));
            }
        });
    }

    private String stackTraceToString(Throwable throwable) {
        String ret = "";
        while (throwable != null) {
            if (ret != "")
                ret += "\nCaused by: ";
            ret += throwable.toString();
            for (StackTraceElement sTE : throwable.getStackTrace())
                ret += "\n  at " + sTE;
            throwable = throwable.getCause();
        }
        return ret;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



hupa/src/main/java/org/apache/hupa/client/Hupa.java [31:71]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class Hupa implements EntryPoint {

    @Override
    public void onModuleLoad() {
        handleExceptionsAsync();
        initApp();
    }

    protected void initApp() {
        DOM.getElementById("loading").removeFromParent();
        createInjector().getHupaController();
        bindEvents();
    }

    protected void bindEvents() {
    }

    protected AppInjector createInjector() {
        return GWT.create(AppGinjector.class);
    }

    protected void handleExceptionsAsync() {
        GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
            public void onUncaughtException(Throwable e) {
                e.printStackTrace();
                GQuery.console.log(stackTraceToString(e));
            }
        });
    }

    private String stackTraceToString(Throwable throwable) {
        String ret = "";
        while (throwable != null) {
            if (ret != "")
                ret += "\nCaused by: ";
            ret += throwable.toString();
            for (StackTraceElement sTE : throwable.getStackTrace())
                ret += "\n  at " + sTE;
            throwable = throwable.getCause();
        }
        return ret;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



