mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-11-22 08:13:20 +00:00
[CLIENT] Issue 8 : suite du correctif
This commit is contained in:
parent
0572f05417
commit
1ba5025a2e
@ -160,11 +160,20 @@ public class QueryExecutor {
|
||||
private void handleUnexpectedTypeInResponse(Message response, IMessageCallback callback){
|
||||
switch (response.getType()) {
|
||||
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){
|
||||
e.printStackTrace();
|
||||
callback.err(null);
|
||||
}
|
||||
break;
|
||||
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;
|
||||
default:
|
||||
callback.err(new IllegalArgumentException(
|
||||
|
Loading…
Reference in New Issue
Block a user