[CLIENT] Issue 8 : suite du correctif

This commit is contained in:
Notmoo-PC\Notmoo 2018-01-21 18:16:31 +01:00
parent 0572f05417
commit 1ba5025a2e

View File

@ -160,11 +160,20 @@ public class QueryExecutor {
private void handleUnexpectedTypeInResponse(Message response, IMessageCallback callback){ private void handleUnexpectedTypeInResponse(Message response, IMessageCallback callback){
switch (response.getType()) { switch (response.getType()) {
case ERROR_QUERY: case ERROR_QUERY:
callback.err(messageToolFactory.getObjectParser(Throwable.class).parse(response.getField("Detail_erreur"))); try{
callback.err(new Exception(response.getField("Detail_erreur")));
}catch(Throwable e){ }catch(Throwable e){
e.printStackTrace();
callback.err(null);
}
break; break;
case REFUSED_QUERY: case REFUSED_QUERY:
callback.ref(messageToolFactory.getObjectParser(Throwable.class).parse(response.getField("Detail_refus"))); try{
callback.ref(new Exception(response.getField("Detail_refus")));
}catch(Throwable e){
e.printStackTrace();
callback.ref(null);
}
break; break;
default: default:
callback.err(new IllegalArgumentException( callback.err(new IllegalArgumentException(