Subversion Repositories eFlore/Applications.del

Rev

Rev 1995 | Rev 2087 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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