From: Niki Roo Date: Sun, 12 May 2019 12:40:30 +0000 (+0200) Subject: remote lib exceptions 1 X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=commitdiff_plain;h=c1b31971129284c53f79dd3ba38f32ec084d06cb remote lib exceptions 1 --- diff --git a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java index 015fb7b..ada4673 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java @@ -144,13 +144,23 @@ public class RemoteLibraryServer extends ServerObject { } System.out.println(trace); - Object rep = doRequest(action, command, args, rw, whitelist); + Object rep = null; + Exception oops = null; + try { + rep = doRequest(action, command, args, rw, whitelist); + } catch (Exception e) { + oops = e; + } commands.put(id, command); wls.put(id, wl); rws.put(id, rw); times.put(id, (new Date().getTime() - start)); + if (oops != null) { + throw oops; + } + return rep; }