Improve some error messages

This commit is contained in:
crschnick 2025-03-19 19:46:31 +00:00
parent ad0e628b60
commit a01756562d
3 changed files with 9 additions and 3 deletions

View file

@ -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)) {

View file

@ -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";

View file

@ -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();
}