Try to fix the remote story sending again + traces
authorNiki Roo <niki@nikiroo.be>
Wed, 29 Nov 2017 22:28:52 +0000 (23:28 +0100)
committerNiki Roo <niki@nikiroo.be>
Wed, 29 Nov 2017 22:28:52 +0000 (23:28 +0100)
libs/nikiroo-utils-3.1.4-sources.jar [moved from libs/nikiroo-utils-3.1.3-sources.jar with 97% similarity]
src/be/nikiroo/fanfix/library/RemoteLibrary.java

similarity index 97%
rename from libs/nikiroo-utils-3.1.3-sources.jar
rename to libs/nikiroo-utils-3.1.4-sources.jar
index 56195ea0aa261e696b15d742ae0c8ce606586079..790a9821821253bea79fd1b1797542d4be9a0a14 100644 (file)
Binary files a/libs/nikiroo-utils-3.1.3-sources.jar and b/libs/nikiroo-utils-3.1.4-sources.jar differ
index 7869b694b23a562e3d6201bf603541089fcafd36..6c6c9e92012bb171ff280fa1cc75a0bc5feab677 100644 (file)
@@ -175,29 +175,30 @@ public class RemoteLibrary extends BasicLibrary {
                        new ConnectActionClientObject(host, port, true) {
                                @Override
                                public void action(Version serverVersion) throws Exception {
-                                       try {
-                                               Story story = null;
-                                               for (int i = 0; i < command.length; i++) {
-                                                       if (command[i] instanceof Story) {
-                                                               story = (Story) command[i];
-                                                               command[i] = null;
-                                                       }
+                                       Story story = null;
+                                       for (int i = 0; i < command.length; i++) {
+                                               if (command[i] instanceof Story) {
+                                                       story = (Story) command[i];
+                                                       command[i] = null;
                                                }
+                                       }
 
-                                               Object rep = send(command);
-
-                                               if (story != null) {
-                                                       RemoteLibraryServer.sendStory(story, this);
-                                               }
+                                       Object rep = send(command);
 
-                                               if (getStory) {
-                                                       rep = RemoteLibraryServer.recStory(this);
-                                               }
+                                       if (story != null) {
+                                               RemoteLibraryServer.sendStory(story, this);
+                                       }
 
-                                               result[0] = rep;
-                                       } catch (Exception e) {
-                                               Instance.getTraceHandler().error(e);
+                                       if (getStory) {
+                                               rep = RemoteLibraryServer.recStory(this);
                                        }
+
+                                       result[0] = rep;
+                               }
+
+                               @Override
+                               protected void onError(Exception e) {
+                                       Instance.getTraceHandler().error(e);
                                }
                        }.connect();
                } catch (IOException e) {