mirror of
https://github.com/xpipe-io/xpipe.git
synced 2025-04-16 17:23:35 +00:00
Improve some error messages
This commit is contained in:
parent
ad0e628b60
commit
a01756562d
3 changed files with 9 additions and 3 deletions
|
@ -15,6 +15,7 @@ import javafx.beans.property.SimpleStringProperty;
|
|||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.control.TextField;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -111,8 +112,13 @@ public class IconsCategory extends AppPrefsCategory {
|
|||
return;
|
||||
}
|
||||
|
||||
var path = Path.of(dir.get());
|
||||
if (Files.isRegularFile(path)) {
|
||||
throw new IllegalArgumentException("A custom icon directory requires to be a directory of .svg files, not a single file");
|
||||
}
|
||||
|
||||
var source = SystemIconSource.Directory.builder()
|
||||
.path(Path.of(dir.get()))
|
||||
.path(path)
|
||||
.id(UUID.randomUUID().toString())
|
||||
.build();
|
||||
if (!sources.contains(source)) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public enum SecretQueryState {
|
|||
yield "Session is not interactive but required user input for authentication";
|
||||
}
|
||||
case FIXED_SECRET_WRONG -> {
|
||||
yield "Authentication failed: Provided authentication secret is wrong";
|
||||
yield "Authentication failed: Provided authentication secret was not accepted by the server, probably because it is incorrect";
|
||||
}
|
||||
case RETRIEVAL_FAILURE -> {
|
||||
yield "Failed to retrieve secret for authentication";
|
||||
|
|
|
@ -204,7 +204,7 @@ public class SshLocalBridge {
|
|||
var exec = CommandSupport.findProgram(sc, "sshd");
|
||||
if (exec.isEmpty()) {
|
||||
throw ErrorEvent.expected(new IllegalStateException(
|
||||
"No sshd executable found in PATH. The SSH terminal bridge requires a local ssh server"));
|
||||
"No sshd executable found in PATH. The SSH terminal bridge for SSH clients requires a local ssh server to be installed"));
|
||||
}
|
||||
return exec.get();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue