From 1ba5025a2e71945c58ea2cdbacc53f54782c3423 Mon Sep 17 00:00:00 2001 From: "Notmoo-PC\\Notmoo" Date: Sun, 21 Jan 2018 18:16:31 +0100 Subject: [PATCH] [CLIENT] Issue 8 : suite du correctif --- .../com/pqt/client/module/query/QueryExecutor.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Workspace/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java b/Workspace/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java index 83b2d927..4d30fd50 100644 --- a/Workspace/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java +++ b/Workspace/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java @@ -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(