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;
/**
* Stop the server.
+ *
+ * @throws IOException
+ * in case of I/O error (including bad key)
*/
public void exit() throws IOException {
connectRemoteAction(new RemoteAction() {