exception handling during mount/unmount/reveal operations

This commit is contained in:
Sebastian Stenzel
2016-01-27 14:46:48 +01:00
parent c56d0b7d4a
commit 091a44e65d
20 changed files with 94 additions and 56 deletions
@@ -0,0 +1,24 @@
/*******************************************************************************
* Copyright (c) 2014 Sebastian Stenzel
* This file is licensed under the terms of the MIT license.
* See the LICENSE.txt file for more info.
*
* Contributors:
* Sebastian Stenzel - initial API and implementation
* Markus Kreusch - Refactored WebDavMounter to use strategy pattern
******************************************************************************/
package org.cryptomator.frontend;
public class CommandFailedException extends Exception {
private static final long serialVersionUID = 5784853630182321479L;
public CommandFailedException(String message) {
super(message);
}
public CommandFailedException(Throwable cause) {
super(cause);
}
}
@@ -9,10 +9,10 @@ public interface Frontend extends AutoCloseable {
MOUNT_NAME, WIN_DRIVE_LETTER
}
boolean mount(Map<MountParam, Optional<String>> map);
void mount(Map<MountParam, Optional<String>> map) throws CommandFailedException;
void unmount();
void unmount() throws CommandFailedException;
void reveal();
void reveal() throws CommandFailedException;
}