Subversion Repositories eFlore/Applications.del

Rev

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

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