X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FRemoteLibrary.java;h=6c6c9e92012bb171ff280fa1cc75a0bc5feab677;hb=851dd5388802907146e88c3f6b9e68094e73693e;hp=7869b694b23a562e3d6201bf603541089fcafd36;hpb=74a40dfb4551443fcb20dddb50af940e14acee25;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/RemoteLibrary.java b/src/be/nikiroo/fanfix/library/RemoteLibrary.java index 7869b69..6c6c9e9 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibrary.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibrary.java @@ -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) {