2212 |
arthur |
1 |
package org.tela_botanica.del.client;
|
|
|
2 |
|
|
|
3 |
import org.tela_botanica.del.client.cache.CacheClient;
|
|
|
4 |
import org.tela_botanica.del.client.gestionhistorique.GestionnaireHistorique;
|
|
|
5 |
import org.tela_botanica.del.client.config.Config;
|
|
|
6 |
|
|
|
7 |
import com.google.gwt.core.client.EntryPoint;
|
|
|
8 |
import com.google.gwt.user.client.History;
|
|
|
9 |
import com.google.gwt.core.client.*;
|
|
|
10 |
|
|
|
11 |
public class Del implements EntryPoint {
|
|
|
12 |
|
|
|
13 |
@Override
|
|
|
14 |
public void onModuleLoad() {
|
|
|
15 |
|
|
|
16 |
/*GWT.setUncaughtExceptionHandler(new
|
|
|
17 |
GWT.UncaughtExceptionHandler() {
|
|
|
18 |
public void onUncaughtException(Throwable e) {
|
|
|
19 |
Throwable unwrapped = unwrap(e);
|
|
|
20 |
Window.alert(buildStackTrace(unwrapped, ""));
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
public Throwable unwrap(Throwable e) {
|
|
|
24 |
if(e instanceof UmbrellaException) {
|
|
|
25 |
UmbrellaException ue = (UmbrellaException) e;
|
|
|
26 |
if(ue.getCauses().size() == 1) {
|
|
|
27 |
return unwrap(ue.getCauses().iterator().next());
|
|
|
28 |
}
|
|
|
29 |
}
|
|
|
30 |
return e;
|
|
|
31 |
}
|
|
|
32 |
});*/
|
|
|
33 |
|
|
|
34 |
CacheClient.getInstance().initialiserAvecParametres();
|
|
|
35 |
History.addValueChangeHandler(new GestionnaireHistorique());
|
|
|
36 |
History.fireCurrentHistoryState();
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
/*private String buildStackTrace(Throwable t, String log) {
|
|
|
40 |
if (t != null) {
|
|
|
41 |
log += t.getClass().toString();
|
|
|
42 |
log += t.getMessage();
|
|
|
43 |
|
|
|
44 |
StackTraceElement[] stackTrace = t.getStackTrace();
|
|
|
45 |
if (stackTrace != null) {
|
|
|
46 |
StringBuffer trace = new StringBuffer();
|
|
|
47 |
|
|
|
48 |
for (int i = 0; i < stackTrace.length; i++) {
|
|
|
49 |
trace.append(stackTrace[i].getClassName() + "." + stackTrace[i].getMethodName() + "("
|
|
|
50 |
+ stackTrace[i].getFileName() + ":" + stackTrace[i].getLineNumber());
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
log += trace.toString();
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
Throwable cause = t.getCause();
|
|
|
57 |
if (cause != null && cause != t) {
|
|
|
58 |
log += buildStackTrace(cause, "CausedBy:\n");
|
|
|
59 |
}
|
|
|
60 |
}
|
|
|
61 |
return log;
|
|
|
62 |
}*/
|
|
|
63 |
|
|
|
64 |
public static native void LogVersFirebug(Object o) /*-{
|
|
|
65 |
if (!!($wnd.console && $wnd.console.log)) {
|
|
|
66 |
console.log(o);
|
|
|
67 |
}
|
|
|
68 |
}-*/;
|
|
|
69 |
}
|