瀏覽代碼

re-added applicable choosers to exception text

Sebastian Stenzel 4 年之前
父節點
當前提交
02fc9b263a
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      main/commons/src/main/java/org/cryptomator/common/vaults/AbstractVolume.java

+ 3 - 2
main/commons/src/main/java/org/cryptomator/common/vaults/AbstractVolume.java

@@ -20,7 +20,8 @@ public abstract class AbstractVolume implements Volume {
 	}
 
 	protected Path determineMountPoint() throws InvalidMountPointException {
-		for (var chooser : Iterables.filter(choosers, c -> c.isApplicable(this))) {
+		var applicableChoosers = Iterables.filter(choosers, c -> c.isApplicable(this));
+		for (var chooser : applicableChoosers) {
 			Optional<Path> chosenPath = chooser.chooseMountPoint(this);
 			if (chosenPath.isEmpty()) { // chooser couldn't find a feasible mountpoint
 				continue;
@@ -29,7 +30,7 @@ public abstract class AbstractVolume implements Volume {
 			this.usedChooser = chooser;
 			return chosenPath.get();
 		}
-		throw new InvalidMountPointException("No feasible MountPoint found!");
+		throw new InvalidMountPointException(String.format("No feasible MountPoint found by choosers: %s", applicableChoosers));
 	}
 
 	protected void cleanupMountPoint() {