Subversion Repositories eFlore/Applications.del

Rev

Rev 1517 | Rev 2078 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.del.client;

import org.tela_botanica.del.client.cache.CacheClient;
import org.tela_botanica.del.client.gestionhistorique.GestionnaireHistorique;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.History;

public class Del implements EntryPoint {
        
        @Override
        public void onModuleLoad() {
                // A décommenter + compiler en detailed dans le cas d'une erreur
                // survernant uniquement sur le serveur
                /*GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
                
                @Override
                public void onUncaughtException(Throwable e) {
                                Window.alert("uncaught: " + e.getMessage());
                                String s = buildStackTrace(e, "RuntimeException:\n");
                                Window.alert(s);
                                e.printStackTrace();
                        }
                });*/

                CacheClient.getInstance().initialiserAvecParametres();
                History.addValueChangeHandler(new GestionnaireHistorique());
                History.fireCurrentHistoryState();
        }
        
        /*private String buildStackTrace(Throwable t, String log) {
                if (t != null) {
                        log += t.getClass().toString();
                        log += t.getMessage();
                        
                        StackTraceElement[] stackTrace = t.getStackTrace();
                        if (stackTrace != null) {
                                StringBuffer trace = new StringBuffer();

                                for (int i = 0; i < stackTrace.length; i++) {
                                        trace.append(stackTrace[i].getClassName() + "." + stackTrace[i].getMethodName() + "("
                                                + stackTrace[i].getFileName() + ":" + stackTrace[i].getLineNumber());
                                }

                                log += trace.toString();
                        }

                        Throwable cause = t.getCause();
                        if (cause != null && cause != t) {
                                log += buildStackTrace(cause, "CausedBy:\n");
                        }
                }
                return log;
        }*/
}