X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FRemoteLibrary.java;h=c2774f936e8966cb7358c30e446bd86f4242b027;hb=d66deb8d8b30cff6b54db352eef34a3508939f84;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..c2774f9 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: *