From c1b31971129284c53f79dd3ba38f32ec084d06cb Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 12 May 2019 14:40:30 +0200 Subject: [PATCH] remote lib exceptions 1 --- .../nikiroo/fanfix/library/RemoteLibraryServer.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; } -- 2.27.0