Subversion Repositories eFlore/Applications.del

Rev

Rev 2087 | 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;
2109 mathias 5
import org.tela_botanica.del.client.config.Config;
9 benjamin 6
 
1 aurelien 7
import com.google.gwt.core.client.EntryPoint;
9 benjamin 8
import com.google.gwt.user.client.History;
2078 mathias 9
import com.google.gwt.core.client.*;
1 aurelien 10
 
11
public class Del implements EntryPoint {
529 jpm 12
 
1 aurelien 13
	@Override
14
	public void onModuleLoad() {
1316 aurelien 15
 
1995 aurelien 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
	    });*/
1316 aurelien 33
 
1561 jpm 34
		CacheClient.getInstance().initialiserAvecParametres();
35
		History.addValueChangeHandler(new GestionnaireHistorique());
1034 benjamin 36
		History.fireCurrentHistoryState();
1 aurelien 37
	}
1316 aurelien 38
 
1501 aurelien 39
	/*private String buildStackTrace(Throwable t, String log) {
1561 jpm 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
	}*/
2087 mathias 63
 
64
	public static native void  LogVersFirebug(Object o) /*-{
65
		if (!!($wnd.console && $wnd.console.log)) {
66
			console.log(o);
67
		}
68
	}-*/;
1 aurelien 69
}