Subversion Repositories eFlore/Applications.del

Rev

Rev 941 | Rev 1667 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 941 Rev 1517
Line 1... Line 1...
1
package org.tela_botanica.del.client.services.rest.async;
1
package org.tela_botanica.del.client.services.rest.async;
Line -... Line 2...
-
 
2
 
-
 
3
import org.tela_botanica.del.client.utils.StringUtils;
2
 
4
 
3
import com.google.gwt.http.client.Request;
5
import com.google.gwt.http.client.Request;
4
import com.google.gwt.http.client.RequestCallback;
6
import com.google.gwt.http.client.RequestCallback;
-
 
7
import com.google.gwt.http.client.Response;
5
import com.google.gwt.http.client.Response;
8
import com.google.gwt.json.client.JSONException;
Line 6... Line 9...
6
import com.google.gwt.user.client.Window;
9
import com.google.gwt.user.client.Window;
7
 
10
 
8
/**
11
/**
Line 49... Line 52...
49
			codeAttendu = 500;
52
			codeAttendu = 500;
50
			break;
53
			break;
51
		}
54
		}
Line 52... Line 55...
52
 
55
 
-
 
56
		if (statusCode == codeAttendu) {
53
		if (statusCode == codeAttendu) {
57
			try {
-
 
58
				T reponseParsee = parserJSON(response.getText());
-
 
59
				surRetour(reponseParsee);
-
 
60
			} catch (JSONException e) {
-
 
61
				StringUtils.logChaine("Une erreur est survenue, le serveur a répondu : "+response.getText());
54
			surRetour(parserJSON(response.getText()));
62
			}		
55
		} else {
63
		} else {
56
			surErreur("Erreur " + statusCode + ": " + response.getText());
64
			surErreur("Erreur " + statusCode + ": " + response.getText());
57
		}
65
		}