remote lib exceptions 1
authorNiki Roo <niki@nikiroo.be>
Sun, 12 May 2019 12:40:30 +0000 (14:40 +0200)
committerNiki Roo <niki@nikiroo.be>
Sun, 12 May 2019 12:40:30 +0000 (14:40 +0200)
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java

index 015fb7bf33c9c2beb79a81173b1f02f180f48db9..ada467311d1e2d77801b6a7df379ee0272dad3f4 100644 (file)
@@ -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;
        }