X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FRemoteLibrary.java;h=bbe772a8c90168c658fa985461e92c58f13bb8d0;hb=d9691f01bac1ea36d234f240534ae8bb94ab522a;hp=077a857cf9a748ddbd242b1af625b853ecf6d75e;hpb=5db598bc6386aaabe69f2eed55b03625c72c236b;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/library/RemoteLibrary.java b/src/be/nikiroo/fanfix/library/RemoteLibrary.java index 077a857..bbe772a 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibrary.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibrary.java @@ -41,12 +41,7 @@ public class RemoteLibrary extends BasicLibrary { Object rep = super.send(data); if (rep instanceof RemoteLibraryException) { RemoteLibraryException remoteEx = (RemoteLibraryException) rep; - IOException cause = remoteEx.getCause(); - if (cause == null) { - cause = new IOException("IOException"); - } - - throw cause; + throw remoteEx.unwrapException(); } return rep; @@ -61,8 +56,6 @@ public class RemoteLibrary extends BasicLibrary { // informative only (server will make the actual checks) private boolean rw; - // TODO: error handling is not up to par! - /** * Create a {@link RemoteLibrary} linked to the given server. *

@@ -85,7 +78,7 @@ public class RemoteLibrary extends BasicLibrary { *

  • wl: flag to allow access to all the stories (bypassing the * whitelist if it exists)
  • * - * + *

    * Some examples: *