Subversion Repositories eFlore/Applications.del

Rev

Rev 1517 | Rev 1995 | 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;
1 aurelien 8
 
9
public class Del implements EntryPoint {
529 jpm 10
 
1 aurelien 11
	@Override
12
	public void onModuleLoad() {
1316 aurelien 13
		// A décommenter + compiler en detailed dans le cas d'une erreur
14
		// survernant uniquement sur le serveur
15
		/*GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
16
 
17
		@Override
18
		public void onUncaughtException(Throwable e) {
19
				Window.alert("uncaught: " + e.getMessage());
20
				String s = buildStackTrace(e, "RuntimeException:\n");
21
				Window.alert(s);
22
				e.printStackTrace();
23
			}
24
		});*/
25
 
1561 jpm 26
		CacheClient.getInstance().initialiserAvecParametres();
27
		History.addValueChangeHandler(new GestionnaireHistorique());
1034 benjamin 28
		History.fireCurrentHistoryState();
1 aurelien 29
	}
1316 aurelien 30
 
1501 aurelien 31
	/*private String buildStackTrace(Throwable t, String log) {
1561 jpm 32
		if (t != null) {
33
			log += t.getClass().toString();
34
			log += t.getMessage();
35
 
36
			StackTraceElement[] stackTrace = t.getStackTrace();
37
			if (stackTrace != null) {
38
				StringBuffer trace = new StringBuffer();
39
 
40
				for (int i = 0; i < stackTrace.length; i++) {
41
					trace.append(stackTrace[i].getClassName() + "." + stackTrace[i].getMethodName() + "("
42
						+ stackTrace[i].getFileName() + ":" + stackTrace[i].getLineNumber());
43
				}
44
 
45
				log += trace.toString();
46
			}
47
 
48
			Throwable cause = t.getCause();
49
			if (cause != null && cause != t) {
50
				log += buildStackTrace(cause, "CausedBy:\n");
51
			}
52
		}
53
		return log;
54
	}*/
1 aurelien 55
}