remote: exceptions
[nikiroo-utils.git] / src / be / nikiroo / fanfix / library / RemoteLibraryServer.java
index ada467311d1e2d77801b6a7df379ee0272dad3f4..c3933ebb276c65e171546109c59d6daa96df8501 100644 (file)
@@ -145,11 +145,10 @@ public class RemoteLibraryServer extends ServerObject {
                System.out.println(trace);
 
                Object rep = null;
-               Exception oops = null;
                try {
                        rep = doRequest(action, command, args, rw, whitelist);
-               } catch (Exception e) {
-                       oops = e;
+               } catch (IOException e) {
+                       rep = new RemoteLibraryException(e);
                }
 
                commands.put(id, command);
@@ -157,10 +156,6 @@ public class RemoteLibraryServer extends ServerObject {
                rws.put(id, rw);
                times.put(id, (new Date().getTime() - start));
 
-               if (oops != null) {
-                       throw oops;
-               }
-
                return rep;
        }