Rev 1501 | Rev 1561 | 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.core.client.GWT;
import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
import com.google.gwt.event.shared.UmbrellaException;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
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.newItem(CacheClient.getInstance().getPageCourante());
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;
}*/
}